[SERVER-9921] db.coll.find() returns nothing after drop and recreate Created: 13/Jun/13 Updated: 10/Dec/14 Resolved: 17/Feb/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.4.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Anton V. Volokhov | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | drop a collection via mongos |
| Participants: |
| Description |
|
2 shards, 2replica+arbiter each, connecting via mongos. Hi there. I've dropped a collection, then continued to write data there(it was a lot of stale data, that I had to remove). here some logs: mongos>use vertis-creativework mongod logs: } } ntoreturn:1 keyUpdates:0 locks(micros) w:12584 reslen:133 12ms } } } } } } mongos>db.pushed.insert({_id:1}) mongod logs: Thu Jun 13 13:23:08 [conn1571507] _reuse extent was:vertis-creativework.pushed now:vertis-creativework.pushed mem info: before index start vsize: 241624 resident: 6123 mapped: 119344 } } } } } } } } ntoreturn:1 keyUpdates:0 reslen:94 0ms } cursorid:2864578847244946404 ntoreturn:0 keyUpdates:0 locks(micros) r:478 nreturned:1 reslen:121 169ms } mongos>db.pushed.find() mongod: mongos>db.pushed.stats() , mongos>db.pushed.find().explain() }, in config.collections there is no document for mentioned collection. |
| Comments |
| Comment by Stennie Steneker (Inactive) [ 17/Feb/14 ] | |||
|
Hi Anton, Please be advised that I'm closing this issue due to inactivity. If you are still able to reproduce the problem, please feel free to reopen with:
Thanks, | |||
| Comment by Duraid Madina [ 09/Sep/13 ] | |||
|
Hi Anton, We've taken a look at the dump, but unfortunately can't find anything in it that conclusively explains the issue you're seeing. Our working hypothesis here is that somehow, something has gone wrong with the collection drop. Would you be able to restart the shard 2 mongod on host04gt.load.net:27017 (the primary shard) and then repeat the db.pushed.find().explain()? Finally, I'd appreciate it if you could send us your mongos and primary mongod logs, after running the above command. Thank you, | |||
| Comment by Anton V. Volokhov [ 18/Aug/13 ] | |||
|
Hi Duraid, I've uploaded the dump. | |||
| Comment by Anton V. Volokhov [ 14/Aug/13 ] | |||
|
Hi! | |||
| Comment by Duraid Madina [ 14/Aug/13 ] | |||
|
Hi Anton, Has the pushed collection ever been sharded? Also, would you be to run:
and upload the contents of the dump/ directory which this command will create? (Just attach it to this ticket.) Please be aware that there may be private or sensitive information in this dump. If that is the case, please let us know, and we will arrange another way for you to send us that data. Thanks, | |||
| Comment by James Blackburn [ 13/Aug/13 ] | |||
|
We see this in 2.2.3: SERVER-9243 Still trying to come up with a reliable reproducer. | |||
| Comment by Anton V. Volokhov [ 13/Aug/13 ] | |||
|
mongos output: shards: { "_id" : "cs_mongodb-sh1-testing", "host" : "cs_mongodb-sh1-testing/host01gt.load.net:27017,host03gt.load.net:27017", "tags" : [ "shard1" ] } { "_id" : "cs_mongodb-sh2-testing", "host" : "cs_mongodb-sh2-testing/host02gt.load.net:27017,host04gt.load.net:27017", "tags" : [ "shard2" ] }databases: { "_id" : "admin", "partitioned" : false, "primary" : "config" }<........> lots of information about other databases { "_id" : "vertis-creativework", "partitioned" : true, "primary" : "cs_mongodb-sh2-testing" }mongos> db.pushed.find().explain() }, mongod output: cs_mongodb-sh2-testing:PRIMARY> db.stats() | |||
| Comment by Duraid Madina [ 13/Aug/13 ] | |||
|
Hi Anton, Can you please tell me the output of:
Also, can you please connect to each of your shards directly, and on each, tell me the output of:
Thank you, | |||
| Comment by Anton V. Volokhov [ 13/Aug/13 ] | |||
|
Hi, I can't drop and recreate table once more, but it is still in inconsistent state: mongos> db.pushed.findOne() , | |||
| Comment by Duraid Madina [ 13/Aug/13 ] | |||
|
Hi Anton, I tried to reproduce your issue, but could not. I'm concerned that one or more of your commands might have had a collection name with a small error. All of the commands you've used would succeed in this case, but might lead to unexpected results. Are you still able to reproduce this issue? If you can, could you please capture the exact commands you use, and attach them to this case? Many thanks, |