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 2022/01/07 19:20:21 UTC
[GitHub] [couchdb] nickva opened a new issue #3885: Changes feed rewinds when a shard is moved to new node with no subsequent updates
nickva opened a new issue #3885:
URL: https://github.com/apache/couchdb/issues/3885
When shards are moved to new nodes we record ownership in an epoch history list in the db shard file. The epoch list looks like `[{node2, seq2}, {node1, seq1}, ...]`. The epoch list is updated when we open the shard on the new node for the first time.
However, if the db on the new node is never updated, such that the current update sequence matches exactly the one when ownership was transferred to the new node, we end re-winding the changes sequence all the way to the previous epoch (usually 0 if this is the first shard move).
The reason seems to be that we use a strictly greater than comparison during the [epoch ownership check](https://github.com/apache/couchdb/blob/3.x/src/couch/src/couch_db.erl#L1796-L1797):
```erlang
owner_of([{EpochNode, EpochSeq} | _Rest], Seq) when Seq > EpochSeq ->
```
--
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 closed issue #3885: Changes feed rewinds when a shard is moved to new node with no subsequent updates
Posted by GitBox <gi...@apache.org>.
nickva closed issue #3885:
URL: https://github.com/apache/couchdb/issues/3885
--
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