[SERVER-23919] Database/Collection drop during initial sync can cause collmod to fail initial sync Created: 25/Apr/16 Updated: 18/May/17 Resolved: 02/May/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.13, 3.2.7, 3.3.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Eric Milkie |
| 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: | Repl 14 (05/13/16) | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
If during the cloning of collections the database is dropped then it is possible that none of the collections are copied – same can happen with a collection as well. If we then apply an operation from the oplog which tries to change that collection, like collMod, it is possible for it fail and error (causing a shutdown of the server). We should write a test to reproduce this before we attempt a fix, to ensure it is a real problem. One possible solution might be that we check if the collection still exists remotely and if not, ignore the error – since the database will be dropped later in the oplog. |
| Comments |
| Comment by Githook User [ 19/May/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: |
| Comment by Githook User [ 19/May/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: |
| Comment by Eric Milkie [ 03/May/16 ] |
|
This is fixed for collmod's that modify the collection. For collmod that modifies an index on the collection (the flag called "index"), there is a still a problem. See |
| Comment by Githook User [ 02/May/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: (cherry picked from commit c52c530428fbbe0cae1293ad6605c3ab7be2a281) |
| Comment by Githook User [ 02/May/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: |
| Comment by Eric Milkie [ 26/Apr/16 ] |
|
I think if we gather and create all collections in all db's at the start of cloning, that should close the race to something small. If we still lose the race, the initial sync will simply restart when it gets to the collMod op. |