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