[SERVER-10265] Automatic removal of stale balancer locks Created: 19/Jul/13 Updated: 19/Jul/13 Resolved: 19/Jul/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Alexander Komyagin | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Description |
|
A balancer lock in the config.locks collection might be left after a balancer round interrupt (like mongos shutdown). We need a way to tell if it's just an orphaned record and drop if it is. One possible way to detect orphaned balancer lock is to add a "nonce" field to the document, which will be generated on the mongos startup and persist while mongoS is running - it will tie the lock to the specific incarnation of the specific mongos. Then it's balancer process will be able to detect and remove the orphaned lock. |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 19/Jul/13 ] |
|
This is already how it works, basically (think of who as your nonce). There is a timeout and the lock will be invalidated and reclaimed by the active balancer after the timeout. |