[SERVER-47422] Use NamespaceSerializer when taking distributed locks for refineCollectionShardKey and migrations Created: 08/Apr/20 Updated: 29/Oct/23 Resolved: 04/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc6, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | Assignee: | Matthew Saltz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||
| Sprint: | Sharding 2020-04-20, Sharding 2020-05-04, Sharding 2020-05-18 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 35 | ||||||||||||||||||||
| Description |
|
Before executing, _configsvrRefineCollectionShardKey takes distributed locks on both a sharded collection's database and full namespace, the latter of which conflicts with the distributed lock a migration takes on a sharded collection namespace. By default, taking a distributed lock times out after 20 seconds and has no fairness policy, so in the presence of many concurrent migrations, a shard key refine can time out waiting for a distributed lock and fail with LockBusy. To handle a similar problem, some config server DDL commands take a NamespaceSerializer lock before taking the distributed lock (e.g. _configsvrDropCollection). We should also be able to use the NamespaceSerializer here to avoid dist lock timeouts. If these changes are too invasive, we should instead modify the refineCollectionShardKey concurrency jstests ("random_moveChunk_refine_collection_*.js") to retry refines that fail with a LockBusy error. |
| Comments |
| Comment by Githook User [ 11/May/20 ] |
|
Author: {'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}Message: (cherry picked from commit 0350dc8d34a54e44cc600d35da06a0af59736f3b) |
| Comment by Githook User [ 01/May/20 ] |
|
Author: {'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}Message: |