[SERVER-64080] ConfigsvrConfigureCollectionBalancing should not call tellShardsToRefreshCollection while holding the chunk lock Created: 01/Mar/22  Updated: 29/Oct/23  Resolved: 03/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0, 5.3.0-rc3

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

Issue Links:
Backports
Problem/Incident
causes SERVER-64319 Coverity analysis defect 121642: Pars... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.3
Sprint: Sharding EMEA 2022-03-07, Sharding EMEA 2022-05-16
Participants:

 Description   

Suppose there is an ongoing chunk migration concurrent with a call to configureCollectionBalancing. The thread running configureCollectionBalancing gets the chunk lock. The migration then enters the critical section. configureCollectionBalancing then calls tellShardsToRefreshCollection which runs flushRoutingTableCacheUpdates which waits for the migration critical section to complete. But the thread running the migration is waiting for the chunk lock in order to commit.

This means we cannot call tellShardsToRefreshCollection while holding the chunk lock.



 Comments   
Comment by Githook User [ 04/Mar/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-64080 ConfigsvrConfigureCollectionBalancing should not call tellShardsToRefreshCollection while holding the chunk lock

(cherry picked from commit 8f793e746623e1337cbf833d55e310374d97146e)
Branch: v5.3
https://github.com/mongodb/mongo/commit/676a969740251e412feb14d203e55948f703e9cb

Comment by Githook User [ 03/Mar/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-64080 ConfigsvrConfigureCollectionBalancing should not call tellShardsToRefreshCollection while holding the chunk lock
Branch: master
https://github.com/mongodb/mongo/commit/8f793e746623e1337cbf833d55e310374d97146e

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