[SERVER-43949] Check for term equality when comparing OpTime for a writeConcern Created: 10/Oct/19  Updated: 29/Oct/23  Resolved: 17/Oct/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2019-10-21
Participants:
Linked BF Score: 28

 Description   

haveNumNodesReachedOpTime and haveTaggedNodesReachedOpTime currently use OpTime comparison functions defined here. But if a OpTime with a higher term comes via heartbeat, we shouldn't consider that as a writeConcern satisfaction. So we should also check for term equality before waking up writeConcern waiters. If a higher term comes, it means that the node will be stepping down. And on member state changes after the stepDown, the existing logic should be able to wake up all remaining waiters with stepDown errors.



 Comments   
Comment by Githook User [ 17/Oct/19 ]

Author:

{'username': 'ldennis', 'email': 'lingzhi.deng@mongodb.com', 'name': 'Lingzhi Deng'}

Message: SERVER-43949: Check for term equality when comparing OpTime for a writeConcern
Branch: master
https://github.com/mongodb/mongo/commit/b37eb88c8ae801751711dd54f2506d3561989db7

Generated at Thu Feb 08 05:04:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.