[SERVER-6696] Sharding an existent collection is losing data Created: 02/Aug/12 Updated: 16/Aug/12 Resolved: 16/Aug/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.0.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Arthur Nogueira Neves | Assignee: | Gregor Macadam |
| Resolution: | Done | Votes: | 0 |
| Labels: | mongod, mongos, sharding | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux preprod 3.2.0-27-virtual #43-Ubuntu SMP Fri Jul 6 14:45:58 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux |
||
| Attachments: |
|
| Operating System: | Linux |
| Participants: |
| Description |
|
We had an unsharded mongodb instance, which had a collection full of documents(~100M). We created an index in that collection in order to shard it. We enabled sharding in that node(primary), and also added another empty node in the shard grid (secondary). Everything was looking fine, but then we realize that we consistently starting losing documents from the chunk that was gettings transfered: In the attachment, i have both mongod running a count in the chunk criteria and one of them is losing documents and the other is not getting any documents. Also I had checked the logs in both mongod servers and everthing was looking fine: So is that an issue? was this fixed in version 2.2 already? |
| Comments |
| Comment by Gregor Macadam [ 13/Aug/12 ] | |||||||||||||||||||||
|
I've managed to reproduce a decreasing number of documents as shown by count(). I started off with 10000000 documents and sharded the collection in the same way that you did. The number shown by count() is actually too large during the balancing (as eliot mentioned), but does show that the number of documents is decreasing back to 10000000. It is possible that this is what you are seeing and so it is important that we know the number of documents you started with - do you know this number?
| |||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 03/Aug/12 ] | |||||||||||||||||||||
|
This is most likely a transient counting problem. |