[SERVER-22535] Some index operations (drop index, abort index build, update TTL config) on collection during active migration can cause migration to skip documents Created: 09/Feb/16 Updated: 17/Nov/16 Resolved: 09/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.12, 3.0.10, 3.2.3, 3.3.2 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | J Rassi | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-only | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Completed: | |||||||||||||
| Sprint: | Query 10 (02/22/16) | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
The migration logic on the donor shard that performs the initial index scan for documents to clone does not handle invalidations properly, and will generate a truncated set of documents to clone if the executor is killed during the index scan. As a result, performing an index operation that invalidates plan executors at the same time that the initial index scan for a migration is yielding will cause some documents to not be transferred during the migration, and these documents will be deleted from the cluster during the next migration cleanup job. The following index operations invalidate plan executors, and thus are able to trigger this issue:
This is a regression introduced in version 1.7.2 by 9923c7b6, and affects all versions released since. The following script will reproduce this issue:
When run locally with version 3.2.1, the above script fails on the last line with the following:
|
| Comments |
| Comment by Githook User [ 07/Mar/16 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: |
| Comment by Githook User [ 04/Mar/16 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: |
| Comment by Githook User [ 22/Feb/16 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: Custom backport from f5a9081a412ada3fc8a472b267f932f76b345126 |
| Comment by Githook User [ 09/Feb/16 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: (cherry picked from commit f5a9081a412ada3fc8a472b267f932f76b345126) |
| Comment by Githook User [ 09/Feb/16 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: |
| Comment by J Rassi [ 09/Feb/16 ] |
|
This issue was discovered during a code audit, as part of the fix for |