[SERVER-15118] Provide synchronization table for ReplicationCoordinatorImpl Created: 02/Sep/14  Updated: 11/Jul/16  Resolved: 03/Sep/14

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

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

The synchronization rules for members of ReplicationCoordinatorImpl are complicated, so we should provide a table and label all member variables.



 Comments   
Comment by Githook User [ 03/Sep/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-15118 While _rsConfig is synchronization type MX, _rsConfigState is type M.

Consulting _rsConfigState requires holding the mutex, even in executor context,
because _rsConfigState may be changed outside of executor context.
Branch: master
https://github.com/mongodb/mongo/commit/477429055ed16135cb38b236a21f2460acff9979

Comment by Githook User [ 02/Sep/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-15118 Clarify locking rules in ReplicationCoordinatorImpl.

Notably, _rsConfig, _rsConfigState and _thisMembersConfigIndex have a locking mode
that makes them safe to read in executor context without holding _mutex.
Branch: master
https://github.com/mongodb/mongo/commit/e109345e7e900355b553a898381772bb7b1bd1e0

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