nickva commented on code in PR #5132:
URL: https://github.com/apache/couchdb/pull/5132#discussion_r1679571652
##########
src/couch/src/couch_bt_engine_header.erl:
##########
@@ -269,14 +270,14 @@ upgrade_epochs(#db_header{} = Header) ->
% was always an implicit assumption that a file was
% owned since eternity by the node it was on. This
% just codifies that assumption.
- [{node(), 0}];
- [{Node, _} | _] = Epochs0 when Node == node() ->
+ [{Node, 0}];
+ [{Node, S} | _] = Epochs0 when Header#db_header.update_seq >= S ->
% Current node is the current owner of this db
Epochs0;
- Epochs1 ->
+ [{_OtherNode, S} | _] = Epochs1 when Header#db_header.update_seq
>= S ->
Review Comment:
That works. If it's in the logs we can get the extra context around that
time. I like the case clause based assertions.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]