nickva commented on code in PR #5603: URL: https://github.com/apache/couchdb/pull/5603#discussion_r2314850497
########## src/couch/src/couch_db_updater.erl: ########## @@ -876,11 +882,23 @@ apply_purge_reqs([Req | RestReqs], IdFDIs, USeq, Replies) -> NewReplies = [{ok, RemovedRevs} | Replies], apply_purge_reqs(RestReqs, NewIdFDIs, NewUSeq, NewReplies). +update_time_seq(#db{time_seq = TSeq} = Db, PrevCommittedSeq) -> + TSeq1 = couch_time_seq:update(TSeq, PrevCommittedSeq), + % Do not expect this structure to update very often, so only + % update the engine if its value changed + case TSeq =:= TSeq1 of Review Comment: `couch_time_seq:update/2` already has an `is_integer/1` guard but it's a good idea to add it here as well, I'll do that. On `=:=` vs `==` I think you have them flipped? I was going for a more exact comparison, there are no floats to coerce so it should be the same but I figured `=:=` semantically makes more sense ("exactly equal" as opposed to "equal but after we coerce the numbers"). ``` 1> {1.0, 2} == {1, 2.0}. true 2> {1.0, 2} =:= {1, 2.0}. false ``` -- 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-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org