[SERVER-13927] Copydb breaks on (some) capped collections Created: 13/May/14 Updated: 10/Dec/14 Resolved: 20/May/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 2.6.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Nick Stott | Assignee: | J Rassi |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Steps To Reproduce: | 1. in 2.4.x, create a capped collection as above |
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
capped collections in earlier versions of mongodb (2.4.x) can sometimes look like this: }, |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 20/May/14 ] |
|
Closing as duplicate of |
| Comment by J Rassi [ 17/May/14 ] |
|
nstott: thanks again for reporting this. We've opened Could you let us know how these collections were created (perhaps the db.createCollection() shell helper, or the db.runCommand(...) shell helper, or a "create collection" helper from an official driver)? This will help us assess how widespread the issue is of having a collection with an invalid value of "max" in the collection options. It's (unfortunately) not possible to manipulate the collection options directly to remove the invalid collection option. If you are able to take this node offline for a maintenance window, you can use dump/restore to remove the invalid collection option with the following:
You can also use the convertToCapped command to restore cappedness to any copies already made of this collection. |
| Comment by Nick Stott [ 14/May/14 ] |
|
yes, it loses that meta data on a resync as well on the primary I have: } } and on the secondary, I just have { "name" : "test-a.capped" } { "name" : "test-a.uncapped" } |
| Comment by Nick Stott [ 14/May/14 ] |
|
I agree, it's the max:"" that seems to break things, |
| Comment by Thomas Rueckstiess [ 13/May/14 ] |
|
The problem seems to be the non-numeric value in the "max" field. This wasn't validated in createCollection in 2.4.x (it is now, in 2.6.x). The capped-ness of the collection is not preserved in that case. rassi@10gen.com, can you have a look at this? |