[SERVER-46849] Range deletion task submission via OpObserver is racy Created: 13/Mar/20 Updated: 29/Oct/23 Resolved: 27/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Saltz (Inactive) | Assignee: | Matthew Saltz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-csrs-stepdown-also | ||
| 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-06 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 32 | ||||||||||||||||
| Description |
|
When we submit ranges for deletion on recipient shards, we submit them through the onUpdate OpObserver when an update is received to remove the 'pending' flag from a document in config.rangeDeletions. This submits an async task which will eventually cause the range to be deleted. The problem is that if the deletion task reaches this line before the commit of the update that triggered it, then it may find that the update has not yet occurred, leading this task to be abandoned. This will lead to orphaned documents until failover, a consequence of which is that incoming migrations for that range will be blocked. |
| Comments |
| Comment by Githook User [ 27/Mar/20 ] |
|
Author: {'email': 'matthew.saltz@mongodb.com', 'name': 'Matthew Saltz', 'username': 'saltzm'}Message: (cherry picked from commit efbe46ec29d5a7ba6bd1786a5c9b47fd44b731d3) |
| Comment by Githook User [ 27/Mar/20 ] |
|
Author: {'email': 'matthew.saltz@mongodb.com', 'name': 'Matthew Saltz', 'username': 'saltzm'}Message: |