[SERVER-82259] replCoord->findConfigMemberByHostAndPort is inherently racy Created: 17/Oct/23  Updated: 14/Nov/23  Resolved: 14/Nov/23

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

Type: Bug 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
Depends
Related
related to SERVER-82594 Verify IndexBuildCoordinator behavior... Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2
Sprint: Repl 2023-11-13, Repl 2023-11-27
Participants:
Linked BF Score: 120

 Description   

In https://jira.mongodb.org/browse/SERVER-47828 we switched from returning a member configuration by copy to returning a pointer. Unfortunately that pointer is to data protected by the repl mutex and can change. We can't switch back to a copy (too slow, which was the original reason for the ticket) so we'll need to come up with another solution.

It's possible there's a bigger issue, in that I'm not sure how the index build coordinator handles it when configurations change while it's running. We may need something like an external config lock.



 Comments   
Comment by Githook User [ 13/Nov/23 ]

Author:

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

Message: SERVER-82259 replCoord->findConfigMemberByHostAndPort is inherently racy
Branch: master
https://github.com/mongodb/mongo/commit/a42af2192bfb294b857d1a78a30617ddac9d949f

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