[SERVER-12092] Modifying collection options can cause restores of collection to fail Created: 13/Dec/13 Updated: 11/Jul/16 Resolved: 17/Dec/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Tools |
| Affects Version/s: | 2.4.8 |
| Fix Version/s: | 2.4.9, 2.5.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Shaun Verch | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
Issue Status as of December 30th, 2013 ISSUE SUMMARY
The process of updating the collection options was found in these cases to sometimes corrupt the collection metadata (as stored in the system collection system.namespaces). Other than affecting the ability for the collection to be restored with mongorestore, the corruption is benign. USER IMPACT SOLUTION WORKAROUNDS
PATCHES Previous DescriptionIf the "create" command is used to create a collection, the field "create" is included as the first collection option in the collection's system.namespaces entry. If the collection options are later modified, the internal update to the system.namespaces collection can re-order the "create" field such that it no longer appears first. Dumping/restoring this collection will subsequently not succeed: mongorestore will send a garbled command to the server upon attempting to re-create the collection, as it assumes that "create" is the first element in the options document (if it appears at all). Reproduce with:
Dumping/restoring this collection fails with "no such command: capped". This does not affect mongod 2.5.x, since the update refactor causes updates to no longer re-order fields. Original ticket description:
|
| Comments |
| Comment by Githook User [ 12/Feb/14 ] |
|
Author: {u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}Message: |
| Comment by Githook User [ 20/Dec/13 ] |
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: Variable "obj" being shadowed by declaration in containing scope. Conflicts: src/mongo/tools/restore.cpp |
| Comment by Githook User [ 20/Dec/13 ] |
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: Fixes an issue where fields in the "create" command object generated Conflicts: src/mongo/tools/restore.cpp |
| Comment by Githook User [ 20/Dec/13 ] |
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: Variable "obj" being shadowed by declaration in containing scope. |
| Comment by Githook User [ 18/Dec/13 ] |
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: |
| Comment by Githook User [ 17/Dec/13 ] |
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: Fixes an issue where fields in the "create" command object generated |
| Comment by Githook User [ 17/Dec/13 ] |
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: |
| Comment by Daniel Pasette (Inactive) [ 16/Dec/13 ] |
|
should fix mongorestore. |
| Comment by J Rassi [ 14/Dec/13 ] |
|
Fix plan:
|