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/19 16:38:57 UTC

[GitHub] [couchdb] nickva opened a new pull request #3794: Include shard uuids in db_info update sequences

nickva opened a new pull request #3794:
URL: https://github.com/apache/couchdb/pull/3794


   This means `update_seq` values from `GET $db` `last_seq` returned from ` GET $db/_changes?since=now&limit=` will be more resilient to change feed rewinds. Besides, those sequences will not be more consistent and users won't have to wonder why one opaque sequence works slightly differently than another opaque update sequence.
   
   Previously, when the sequences were returned only as numeric values, it was impossible to calculate replacements and change feeds had to always rewind back to 0 for those ranges. With uuids and epochs in play, it is possible to figure out that some shards might have moved to new nodes or find internal replication checkpoints to avoid streaming changes feeds from 0 on those ranges.
   
   Fixes: https://github.com/apache/couchdb/issues/3787
   


-- 
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



[GitHub] [couchdb] nickva merged pull request #3794: Include shard uuids in db_info update sequences

Posted by GitBox <gi...@apache.org>.
nickva merged pull request #3794:
URL: https://github.com/apache/couchdb/pull/3794


   


-- 
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



[GitHub] [couchdb] nickva commented on a change in pull request #3794: Include shard uuids in db_info update sequences

Posted by GitBox <gi...@apache.org>.
nickva commented on a change in pull request #3794:
URL: https://github.com/apache/couchdb/pull/3794#discussion_r732093010



##########
File path: src/fabric/src/fabric_view_changes.erl
##########
@@ -410,6 +413,12 @@ unpack_seq_decode_term(Opaque) ->
     binary_to_term(couch_util:decodeBase64Url(Opaque)).
 
 
+% This is used for testing and for remsh debugging
+unpack_seqs(Packed) ->

Review comment:
       Good idea!




-- 
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



[GitHub] [couchdb] rnewson commented on a change in pull request #3794: Include shard uuids in db_info update sequences

Posted by GitBox <gi...@apache.org>.
rnewson commented on a change in pull request #3794:
URL: https://github.com/apache/couchdb/pull/3794#discussion_r732148624



##########
File path: src/fabric/src/fabric_view_changes.erl
##########
@@ -410,6 +413,12 @@ unpack_seq_decode_term(Opaque) ->
     binary_to_term(couch_util:decodeBase64Url(Opaque)).
 
 
+% This is used for testing and for remsh debugging
+unpack_seqs(Packed) ->

Review comment:
       a different name seems warranted.




-- 
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



[GitHub] [couchdb] nickva commented on a change in pull request #3794: Include shard uuids in db_info update sequences

Posted by GitBox <gi...@apache.org>.
nickva commented on a change in pull request #3794:
URL: https://github.com/apache/couchdb/pull/3794#discussion_r732163824



##########
File path: src/fabric/src/fabric_view_changes.erl
##########
@@ -410,6 +413,12 @@ unpack_seq_decode_term(Opaque) ->
     binary_to_term(couch_util:decodeBase64Url(Opaque)).
 
 
+% This is used for testing and for remsh debugging
+unpack_seqs(Packed) ->

Review comment:
       Also a good idea `decode_seq?`. I saw some debug snippets calling it that way a few times already. That would avoid the confusion. I might keep the type specs and comments for clarity too




-- 
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



[GitHub] [couchdb] kocolosk commented on a change in pull request #3794: Include shard uuids in db_info update sequences

Posted by GitBox <gi...@apache.org>.
kocolosk commented on a change in pull request #3794:
URL: https://github.com/apache/couchdb/pull/3794#discussion_r732091076



##########
File path: src/fabric/src/fabric_view_changes.erl
##########
@@ -410,6 +413,12 @@ unpack_seq_decode_term(Opaque) ->
     binary_to_term(couch_util:decodeBase64Url(Opaque)).
 
 
+% This is used for testing and for remsh debugging
+unpack_seqs(Packed) ->

Review comment:
       Nit: I think it's going to be confusing that `unpack_seqs/1` and `unpack_seqs/2` return different data structures. Might be worth a type signature as a comment. 




-- 
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