[SERVER-65671] Use _termShadow in updateTerm and processReplSetMetadata Created: 14/Apr/22  Updated: 29/Oct/23  Resolved: 01/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Matthew Russotto Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-59776 50% regression in single multi-update Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.0, v5.3, v5.0
Sprint: Repl 2022-04-18, Repl 2022-05-02, Repl 2022-05-16, Repl 2022-05-30, Repl 2022-06-13
Participants:

 Description   

In the Replication Coordinator, we currently take the replication coordinator lock whenever we update the term (every find and getMore) or receive a command with replSetMetadata (e.g. replSetUpdatePosition). In both cases we need only take the lock when the term we receive is greater than our current term, which we can determine by checking the existing atomic _termShadow.



 Comments   
Comment by Githook User [ 01/Jun/22 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-65671 Use _termShadow in updateTerm and processReplSetMetadata
Branch: master
https://github.com/mongodb/mongo/commit/0dae18bfa7ecba8820f032a0a53efa6cc02e4b0c

Generated at Thu Feb 08 06:03:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.