You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/10/18 04:46:38 UTC

[GitHub] [couchdb] nickva commented on pull request #3792: Minimize rewinds when a node is down

nickva commented on pull request #3792:
URL: https://github.com/apache/couchdb/pull/3792#issuecomment-945361467


   Tested with a q=2&n=2 db
   
   ```
   http get $DB/db1/_shards
   {
       "shards": {
           "00000000-7fffffff": ["node3@127.0.0.1","node2@127.0.0.1","node1@127.0.0.1"],
           "80000000-ffffffff": ["node3@127.0.0.1","node2@127.0.0.1","node1@127.0.0.1"]
       }
   }
   ```
   
   Inserted a few docs and got a sequence: 
   ```
   17-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV2MDQy1zMAQsMckEQiQ1L9____szKYE7lzgQLsloZGSZbJxpjK4UYYohmRxwIkGRqA1H-oSWxgk5LSkkzTLJIwdWUBAFd3JLs
   ```
   
   Decodes as:
   ```
   Decode("g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV2MDQy1zMAQsMckEQiQ1L9____szKYE7lzgQLsloZGSZbJxpjK4UYYohmRxwIkGRqA1H-oSWxgk5LSkkzTLJIwdWUBAFd3JLs").
   [
    {'node3@127.0.0.1',[0,2147483647],          {11,<<"912b9c3">>,'node3@127.0.0.1'}},
    {'node1@127.0.0.1',[2147483648,4294967295], {6,<<"bfb5f8b">>,'node1@127.0.0.1'}}
   ]
   ```
   
   Killing node3 and getting since with the sequence yields 0 pending as expected
   
   ```
   http get $DB/db1/_changes'?since=17-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV2MDQy1zMAQsMckEQiQ1L9____szKYE7lzgQLsloZGSZbJxpjK4UYYohmRxwIkGRqA1H-oSWxgk5LSkkzTLJIwdWUBAFd3JLs&limit=1'
   
   {
       "last_seq": "17-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTV0MDQy1zMAQsMckEQiQ1L9____szKYE7lzgQLsZhZmlsaWiZjKcRqRxwIkGRqA1H-oSWxgk5LSkkzTLJIwdWUBAEhXJJQ",
       "pending": 0,
       "results": []
   }
   ```
   
   A very nice find and fix


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org