-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Performance
-
None
ISSUE SUMMARY
For certain use cases, the number of sharded collections can grow to such a number that distributed locking slows due to lack of indexes over the lock entries in the config database.
USER IMPACT
Sharding operations that require distributed locks (like splitting and moving chunks) can be delayed or blocked on systems with a very large number of sharded collections.
SOLUTION
The fix is to add indexes to the config.locks and config.lockpings collections to make these queries faster.
WORKAROUNDS
Affected users can create the indexes manually. The indexes to create are:
config.locks: { ts : 1 } config.locks: { state : 1, process : 1 } config.lockpings: { ping : 1 }
Limiting the number of sharded collections per cluster or deploying more performant hardware for config servers can also alleviate the problem.
AFFECTED VERSIONS
All recent production release versions up to 2.4.9 are affected.
PATCHES
The fix is included in the 2.4.10 production release and the 2.5.5 development version, which will evolve into the 2.6.0 production release.
Original Description
For certain use cases, the number of sharded collections can grow to such a number that distributed locking slows due to lack of indexes over the lock entries.
Add default indexes to the distributed locks collection to make lock queries fast.
- is related to
-
SERVER-15691 acquiring balancer lock may fail and get stuck with concurrent write traffic
- Closed