couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [2/3] couchdb commit: updated refs/heads/1824-replication-protocol to 6ed8936
Date Wed, 07 May 2014 23:36:30 GMT
Simplify graphs

Remove all Failure->Retry->Abort branches that aren't a part of
replication workflow. This should be in recommendation part to repeat
all requests in case of recoverable failure.

Mention in graphs HTTP errors that are not fatal.

Tiny restructure to improve readability.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2a0126a0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2a0126a0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2a0126a0

Branch: refs/heads/1824-replication-protocol
Commit: 2a0126a05b0417aaa1042a0a7d505885cc53029c
Parents: e8be43c
Author: Alexander Shorin <kxepal@apache.org>
Authored: Thu May 8 02:34:25 2014 +0400
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Thu May 8 02:34:25 2014 +0400

----------------------------------------------------------------------
 share/doc/src/replication/protocol.rst | 436 ++++++++++++++--------------
 1 file changed, 219 insertions(+), 217 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/2a0126a0/share/doc/src/replication/protocol.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/replication/protocol.rst b/share/doc/src/replication/protocol.rst
index 6c029f8..f6a4044 100644
--- a/share/doc/src/replication/protocol.rst
+++ b/share/doc/src/replication/protocol.rst
@@ -184,30 +184,30 @@ Verify Peers
   + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+
   ' Verify Peers:                                                                  '
   '                                                                                '
-  '                +-------+    No   +---------------------------------+           '
-  '   +----------> | Abort | <------ |         Source Exists?          |          
'
-  '   |            +-------+         +---------------------------------+           '
-  '   |              ^               |          HEAD /source           |           '
-  '   |              |               +---------------------------------+           '
-  '   |              |                 |                                           '
-  '   |              |                 | Yes                                       '
-  '   |              |                 v                                           '
-  '   |              |               +---------------------------------+           '
-  '   |              |               |         Target Exists?          | ---+      '
-  '   |              |               +---------------------------------+    |      '
-  '   |              |               |          HEAD /target           |    |      '
-  '   |              |               +---------------------------------+    |      '
-  '   |              |                 |                                    |      '
-  '   | Failure      | No              | No                                 |      '
-  '   |              |                 v                                    |      '
-  '   |              |               +---------------------------------+    |      '
-  '   |              +-------------- |      May be Create Target?      |    |      '
-  '   |                              +---------------------------------+    |      '
-  '   |                                |                                    |      '
-  '   |                                | Yes                                | Yes  '
-  '   |                                v                                    |      '
-  '   |                              +---------------------------------+    |      '
-  '   +----------------------------- |          Create Target          |    |      '
+  '                  404 Not Found   +---------------------------------+           '
+  '       +------------------------- |         Source Exists?          |           '
+  '       |                          +---------------------------------+           '
+  '       |                          |          HEAD /source           |           '
+  '       |                          +---------------------------------+           '
+  '       |                            |                                           '
+  '       |                            | 200 OK                                    '
+  '       |                            v                                           '
+  '       |                          +---------------------------------+           '
+  '       |                          |         Target Exists?          | ---+      '
+  '       |                          +---------------------------------+    |      '
+  '       |                          |          HEAD /target           |    |      '
+  '       |                          +---------------------------------+    |      '
+  '       |                            |                                    |      '
+  '       |                            | 404 Not Found                      |      '
+  '       v                            v                                    |      '
+  '   +-------+      404 Not Found   +---------------------------------+    |      '
+  '   | Abort | <------------------- |      May be Create Target?      |    |      '
+  '   +-------+                      +---------------------------------+    |      '
+  '       ^                            |                                    |      '
+  '       |                            | Yes                         200 OK |      '
+  '       |                            v                                    |      '
+  '       |          Failure         +---------------------------------+    |      '
+  '       +------------------------- |          Create Target          |    |      '
   '                                  +---------------------------------+    |      '
   '                                  |           PUT /target           |    |      '
   '                                  +---------------------------------+    |      '
@@ -317,44 +317,46 @@ Get Peers Information
 
 .. code-block:: text
 
-  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+
-  ' Verify Peers:                                                        '
-  '                                       +------------------------+     '
-  '                                       |      Target Exists?    |     '
-  '                                       +------------------------+     '
-  '                                         |                            '
-  '                                         | Yes                        '
-  '                                         |                            '
-  + - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -+
-                                            |
-  + - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -+
-  ' Get Peers Information:                  |                            '
-  '                                         v                            '
-  ' +----------------------+    Failure   +------------------------+     '
-  ' |        Abort         | <----------- | Get Source Information |     '
-  ' +----------------------+              +------------------------+     '
-  '   ^                                   |      GET /source       |     '
-  '   |                                   +------------------------+     '
-  '   |                                     |                            '
-  '   |                                     | 200 OK                     '
-  '   |                                     v                            '
-  '   |                         Failure   +------------------------+     '
-  '   +---------------------------------- | Get Target Information |     '
-  '                                       +------------------------+     '
-  '                                       |      GET /target       |     '
-  '                                       +------------------------+     '
-  '                                         |                            '
-  + - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -+
-                                            |
-  + - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -+
-  ' Find out Common Ancestry:               |                            '
-  '                                         | 200 OK                     '
-  '                                         v                            '
-  '                                      +-------------------------+     '
-  '                                      | Generate Replication ID |     '
-  '                                      +-------------------------+     '
-  '                                                                      '
-  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+
+  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+
+  ' Verify Peers:                                                    '
+  '                         +------------------------+               '
+  '                         |     Target Exists?     |               '
+  '                         +------------------------+               '
+  '                                     |                            '
+  '                                     | Yes                        '
+  '                                     |                            '
+  + - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -+
+                                        |
+  + - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -+
+  ' Get Peers Information:              |                            '
+  '                                     v                            '
+  '                         +------------------------+               '
+  '                         | Get Source Information |               '
+  '                         +------------------------+               '
+  '                         |      GET /source       |               '
+  '                         +------------------------+               '
+  '                                     |                            '
+  '                                     | 200 OK                     '
+  '                                     v                            '
+  '                         +------------------------+               '
+  '                         | Get Target Information |               '
+  '                         +------------------------+               '
+  '                         |      GET /target       |               '
+  '                         +------------------------+               '
+  '                                     |                            '
+  '                                     | 200 OK                     '
+  '                                     |                            '
+  + - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -+
+                                        |
+  + - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -+
+  ' Find out Common Ancestry:           |                            '
+  '                                     |                            '
+  '                                     v                            '
+  '                         +-------------------------+              '
+  '                         | Generate Replication ID |              '
+  '                         +-------------------------+              '
+  '                                                                  '
+  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+
 
 
 Replicator retrieves basic information both from Source and Target using
@@ -453,48 +455,44 @@ Find out Common Ancestry
   '                             |          Generate Replication ID          | '
   '                             +-------------------------------------------+ '
   '                               |                                           '
-  '                               |                                           + - - - - -
-+
-  '                               v                                                     
  '
-  '                             +-------------------------------------------+           
  '
-  '                             |      Get Replication Log from Source      |           
  '
-  '                             +-------------------------------------------+           
  '
-  '   +------------------------ |     GET /source/_local/replication-id     |           
  '
-  '   |                         +-------------------------------------------+           
  '
-  '   |                           |                                                     
  '
-  '   | 404 Not Found             | 200 OK                                              
  '
-  '   |                           v                                                     
  '
-  '   |                         +-------------------------------------------+           
  '
-  '   +-----------------------> |      Get Replication Log from Target      |        
     '
-  '                             +-------------------------------------------+           
  '
-  '   +------------------------ |     GET /target/_local/replication-id     |           
  '
-  '   |                         +-------------------------------------------+           
  '
-  '   |                           |                                                     
  '
-  '   | 404 Not Found             | 200 OK                                              
  '
-  '   |                           v                                                     
  '
-  '   |                         +------------------------------------------------+      
  '
-  '   +-----------------------> |                 Compare Logs                   |   
     '
-  '                             +------------------------------------------------+      
  '
-  '                               |                                            |        
  '
-  '                               | Match                  No common ancestry  |        
  '
-  '                               v                                            v        
  '
-  '   +-------------------------------------------+  +---------------------------+      
  '
-  '   | Use Last Recorded Seq as Start Checkpoint |  | Set Start Checkpoint to 0 |      
  '
-  '   +-------------------------------------------+  +---------------------------+      
  '
-  '                               |                                            |        
  '
-  '                               +--------------------------------------------+        
  '
-  '                               |                                                     
  '
-  + - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - - - - - -
-+
+  '                               |                                           '
+  '                               v                                           '
+  '                             +-------------------------------------------+ '
+  '                             |      Get Replication Log from Source      | '
+  '                             +-------------------------------------------+ '
+  '                             |     GET /source/_local/replication-id     | '
+  '                             +-------------------------------------------+ '
+  '                               |                                           '
+  '                               | 200 OK                                    '
+  '                               | 404 Not Found                             '
+  '                               v                                           '
+  '                             +-------------------------------------------+ '
+  '                             |      Get Replication Log from Target      | '
+  '                             +-------------------------------------------+ '
+  '                             |     GET /target/_local/replication-id     | '
+  '                             +-------------------------------------------+ '
+  '                               |                                           '
+  '                               | 200 OK                                    '
+  '                               | 404 Not Found                             '
+  '                               v                                           '
+  '                             +-------------------------------------------+ '
+  '                             |          Compare Replication Logs         | '
+  '                             +-------------------------------------------+ '
+  '                               |                                           '
+  '                               | Use latest common sequence as start point '
+  '                               |                                           '
+  + - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - +
                                   |
                                   |
-  + - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - - - - - -
-+
-  ' Locate Changed Documents:     |                                                     
  '
-  '                               |                                                     
  '
-  '                               v                                                     
  '
-  '                             +-------------------------------------------+           
  '
-  '                             |        Listen Source Changes Feed         |           
  '
-  '                             +-------------------------------------------+           
  '
-  '                                                                                     
  '
-  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-+
+  + - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - +
+  ' Locate Changed Documents:     |                                           '
+  '                               |                                           '
+  '                               v                                           '
+  '                             +-------------------------------------------+ '
+  '                             |        Listen Source Changes Feed         | '
+  '                             +-------------------------------------------+ '
+  '                                                                           '
+  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
 
 
 Generate Replication ID
@@ -535,8 +533,8 @@ hash value computed from HTTP request. As for CouchDB, next algorithm
is used:
    .. _couch_replicator_utils.erl: https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=blob;f=src/couch_replicator/src/couch_replicator_utils.erl;h=d7778db;hb=HEAD
 
 
-Retrieve Replication Logs
-^^^^^^^^^^^^^^^^^^^^^^^^^
+Retrieve Replication Logs from Source and Target
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Once Replication ID have been generated, Replicator SHOULD seek Replication Log
 by this ID value both on Source and Target using :get:`/{db}/_local/{docid}`
@@ -715,37 +713,37 @@ Locate Changed Documents
                                                    |
   + - - - - - - - - - - - - - - - - - - - - - - -  |  - - - - - - - - - - - - - - - - - -
- - - +
   ' Locate Changed Documents:                      |                                    
       '
-  '                                                +--------------------------+         
       '
-  '                                                |                          | Yes     
       '
-  '                                                v                          |         
       '
-  '             +------------------------------------+        Failure       +---------------+
  '
-  '   +-------> |        Listen Changes Feed         | -------------------> | May be
Retry? |   '
-  '   |         +------------------------------------+                      +---------------+
  '
-  '   |         |       GET  /source/_changes        |                        |         
       '
-  '   |         |       POST /source/_changes        |                        | No      
       '
-  '   |         +------------------------------------+                        v         
       '
-  '   |           |                                |                        +---------------+
  '
-  '   |           |                                |                        |     Abort 
   |   '
-  '   |           | There are new changes          +-------------+          +---------------+
  '
-  '   |           |                                              |                      
       '
-  '   |           v                                              |                      
       '
+  '                                                |                                    
       '
+  '                                                |                                    
       '
+  '                                                v                                    
       '
+  '             +------------------------------------+                                  
       '
+  '   +-------> |        Listen Changes Feed         | ----------+                   
          '
   '   |         +------------------------------------+           |                      
       '
-  '   |         |       Read Batch of Changes        |           |                      
       '
+  '   |         |       GET  /source/_changes        |           |                      
       '
+  '   |         |       POST /source/_changes        |           |                      
       '
   '   |         +------------------------------------+           |                      
       '
   '   |           |                                              |                      
       '
-  '   | No        |                                              | No more changes      
       '
-  '   |           v                                              |                      
       '
-  '   |         +------------------------------------+           |                      
       '
-  '   |         | Compare Docs Revisions with Target |           |                      
       '
-  '   |         +------------------------------------+           |                      
       '
-  '   |         |       POST /target/_revs_diff      |           |                      
       '
-  '   |         +------------------------------------+           |                      
       '
   '   |           |                                              |                      
       '
-  '   |           | 200 OK                                       |                      
       '
+  '   |           | There are new changes                        | No more changes      
       '
+  '   |           |                                              |                      
       '
   '   |           v                                              v                      
       '
   '   |         +------------------------------------+         +----------------------------+
  '
-  '   +-------- |     Any Difference was Found?      |         |    Replication Completed
  |   '
-  '             +------------------------------------+         +----------------------------+
  '
+  '   |         |       Read Batch of Changes        |         |    Replication Completed
  |   '
+  '   |         +------------------------------------+         +----------------------------+
  '
+  '   |           |                                                                     
       '
+  '   | No        |                                                                     
       '
+  '   |           v                                                                     
       '
+  '   |         +------------------------------------+                                  
       '
+  '   |         | Compare Docs Revisions with Target |                                  
       '
+  '   |         +------------------------------------+                                  
       '
+  '   |         |       POST /target/_revs_diff      |                                  
       '
+  '   |         +------------------------------------+                                  
       '
+  '   |           |                                                                     
       '
+  '   |           | 200 OK                                                              
       '
+  '   |           v                                                                     
       '
+  '   |         +------------------------------------+                                  
       '
+  '   +-------- |     Any Difference was Found?      |                                  
       '
+  '             +------------------------------------+                                  
       '
   '                                                |                                    
       '
   + - - - - - - - - - - - - - - - - - - - - - - -  |  - - - - - - - - - - - - - - - - - -
- - - +
                                                    |
@@ -754,7 +752,7 @@ Locate Changed Documents
   '                                                | Yes                                
       '
   '                                                v                                    
       '
   '             +------------------------------------+                                  
       '
-  '             |           Fetch Document           |                                  
       '
+  '             |     Fetch Next Changed Document    |                                  
       '
   '             +------------------------------------+                                  
       '
   '                                                                                     
       '
   + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - +
@@ -967,93 +965,97 @@ Replicate Changes
   + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - +
   ' Locate Changed Documents:                                                           
         '
   '                                                                                     
         '
-  '                  +-------------------------------------+                            
         '
-  '                  |      Any Difference was Found?      |                            
         '
-  '                  +-------------------------------------+                            
         '
-  '                                   |                                                 
         '
-  '                                   | Yes                                             
         '
-  '                                   |                                                 
         '
-  + - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - +
-                                      |
-  + - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - +
-  ' Replicate Changes:                |                                                 
         '
-  '                                   v                                                 
         '
-  '               +-------------------------------------+                               
         '
-  '   +---------> |     Fetch Next Changed Document     | <----------------------+-----------+
   '
-  '   |           +-------------------------------------+                        |      
    |    '
-  '   |           |          GET /source/docid          |                    Yes |      
    |    '
-  '   |           +-------------------------------------+                        |      
    |    '
-  '   |             |                                 |                          |      
    |    '
-  '   |             |                                 |  Failure   +---------------+    
    |    '
-  '   |             |                                 +----------> | May Be Retry? | 
       |    '
-  '   |             | 200 OK                                       +---------------+    
    |    '
-  '   |             |                                                |                  
    |    '
-  '   |             |                                             No |           201 Created
|    '
-  '   |             v                                                v                  
    |    '
-  '   |           +-------------------------------------+          +---------------+    
    |    '
-  '   |      +--- |  Has Document Changed Attachments?  |          |     Abort     |    
    |    '
-  '   |      |    +-------------------------------------+          +---------------+    
    |    '
-  '   |      |      |                                                                   
    |    '
-  '   |      |      | Yes                                                               
    |    '
-  '   |      |      v                                                                   
    |    '
-  '   |      |    +-------------------------------------+          +---------------+    No
  |    '
-  '   |  No  |    |        Are They Big Enough?         | -----+   | May Be Retry? | --------+
   '
-  '   |      |    +-------------------------------------+      |   +---------------+    
    |    '
-  '   |      |      |                                          |     ^           |      
    |    '
-  '   |      |      | No                                   Yes |     | Failure   | Yes  
    |    '
-  '   |      |      v                                          |     |           v      
    |    '
-  '   |      |    +-------------------------------------+      |   +---------------------------+
 '
-  '   |      +--> |     Put Document Into the Stack     |      +-> | Update Document
on Target |  '
-  '   |           +-------------------------------------+          +---------------------------+
 '
-  '   |             |                                              |     PUT /target/docid
    |  '
-  '   |             |                                              +---------------------------+
 '
-  '   |             v                                                                   
         '
-  '   |           +-------------------------------------+                               
         '
-  '   +---------- |    All Documents Are Processed?     |                               
         '
-  '               +-------------------------------------+                               
         '
-  '                 |                                                                   
  + - - -+
-  + - - - - - - +   |                                                                   
  '
-                '   |                                                                   
  '
-                '   | Yes                                                               
  '
-                '   +------------------------------------------------------+            
  '
-                '   |                                                      |            
  '
-                '   |                                                      |            
  '
-                '   v                                                      |            
  '
-                ' +-------------------------------------+   Failure      +---------------+
'
-                ' | Upload Stack of Documents to Target | -------------> | May Be Retry?
| '
-                ' +-------------------------------------+                +---------------+
'
-                ' |       POST /target/_bulk_docs       |                  |            
  '
-                ' +-------------------------------------+                  |            
  '
-                '   |                                                      |            
  '
-                '   | 201 Created                                          | No         
  '
-                '   v                                                      v            
  '
-                ' +-------------------------------------+   Failure      +---------------+
'
-                ' |          Ensure in Commit           | -------------> |     Abort 
   | '
-                ' +-------------------------------------+                +---------------+
'
-                ' |  POST /target/_ensure_full_commit   |                  ^            
  '
-                ' +-------------------------------------+                  |            
  '
-                '   |                                                      |            
  '
-                '   | 201 Created                                          | No         
  '
-                '   v                                                      |            
  '
-                ' +-------------------------------------+   Failure      +---------------+
'
-                ' |    Record Replication Checkpoint    | -------------> | May Be Retry?
| '
-                ' +-------------------------------------+                +---------------+
'
-                ' |  PUT /source/_local/replication-id  |   Yes            |            
  '
-                ' |  PUT /target/_local/replication-id  | <----------------+         
     '
-                ' +-------------------------------------+                               
  '
-                '                                     |                                 
  '
-                '                         201 Created |                                 
  '
-                '                                     |                                 
  '
-                + - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - -
-+
-                                                      |
-  + - - - - - - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - -
-+
-  ' Locate Changed Documents:                         |                                 
  '
-  '                                                   v                                 
  '
-  '               +-------------------------------------+                               
  '
-  '               |         Listen Changes Feed         |                               
  '
-  '               +-------------------------------------+                               
  '
-  '                                                                                     
  '
-  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-+
+  '                     +-------------------------------------+                         
         '
+  '                     |      Any Difference was Found?      |                         
         '
+  '                     +-------------------------------------+                         
         '
+  '                       |                                                             
         '
+  '                       | Yes                                                         
         '
+  '                       |                                                             
         '
+  + - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - +
+                          |
+  + - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - +
+  ' Replicate Changes:    |                                                             
         '
+  '                       v                                                             
         '
+  '                     +-------------------------------------+                         
         '
+  '   +---------------> |     Fetch Next Changed Document     | <----+            
               '
+  '   |                 +-------------------------------------+      |                  
         '
+  '   |                 |          GET /source/docid          |      |                  
         '
+  '   |                 +-------------------------------------+      |                  
         '
+  '   |                   |                                          |                  
         '
+  '   |                   |                                          |                  
         '
+  '   |                   |                                          | 201 Created      
         '
+  '   |                   | 200 OK                                   | 401 Unauthorized 
         '
+  '   |                   |                                          | 403 Forbidden    
         '
+  '   |                   |                                          |                  
         '
+  '   |                   v                                          |                  
         '
+  '   |                 +-------------------------------------+    +---------------------------+
 '
+  '   |      +--------- |  Document Has Changed Attachments?  |    | Update Document on Target
|  '
+  '   |      |          +-------------------------------------+    +---------------------------+
 '
+  '   |      |            |                                        |     PUT /target/docid
    |  '
+  '   |      |            |                                        +---------------------------+
 '
+  '   |      |            | Yes                                      ^                  
         '
+  '   |      |            |                                          |                  
         '
+  '   |      |            v                                          | Yes              
         '
+  '   |      |          +-------------------------------------+      |                  
         '
+  '   |      | No       |        Are They Big Enough?         | -----+                  
         '
+  '   |      |          +-------------------------------------+                         
         '
+  '   |      |            |                                                             
         '
+  '   |      |            | No                                                          
         '
+  '   |      |            v                                                             
         '
+  '   |      |          +-------------------------------------+                         
         '
+  '   |      +--------> |     Put Document Into the Stack     |                      
            '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                   |                                                             
         '
+  '   |                   |                                                             
         '
+  '   |                   v                                                             
         '
+  '   |        No       +-------------------------------------+                         
         '
+  '   +---------------- |           Stack is Full?            |                         
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                   |                                                             
         '
+  '   |                   | Yes                                                         
         '
+  '   |                   |                                                             
         '
+  '   |                   v                                                             
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                 | Upload Stack of Documents to Target |                         
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                 |       POST /target/_bulk_docs       |                         
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                   |                                                             
         '
+  '   |                   | 201 Created                                                 
         '
+  '   |                   v                                                             
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                 |          Ensure in Commit           |                         
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                 |  POST /target/_ensure_full_commit   |                         
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                   |                                                             
         '
+  '   |                   | 201 Created                                                 
         '
+  '   |                   v                                                             
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                 |    Record Replication Checkpoint    |                         
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                 |  PUT /source/_local/replication-id  |                         
         '
+  '   |                 |  PUT /target/_local/replication-id  |                         
         '
+  '   |                 +-------------------------------------+                         
         '
+  '   |                   |                                                             
         '
+  '   |                   | 201 Created                                                 
         '
+  '   |                   v                                                             
         '
+  '   |        No       +-------------------------------------+                         
         '
+  '   +---------------- | All Documents from Batch Processed? |                         
         '
+  '                     +-------------------------------------+                         
         '
+  '                                                         |                           
         '
+  '                                                     Yes |                           
         '
+  '                                                         |                           
         '
+  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -
- - - - +
+                                                            |
+  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - -
- - - - +
+  ' Locate Changed Documents:                               |                           
         '
+  '                                                         v                           
         '
+  '                     +-------------------------------------+                         
         '
+  '                     |         Listen Changes Feed         |                         
         '
+  '                     +-------------------------------------+                         
         '
+  '                                                                                     
         '
+  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - +
 
 
 Fetch Changed Documents


Mime
View raw message