[SERVER-32481] "cleanup orphaned documents" is not useful for hashed sharding cluster Created: 29/Dec/17 Updated: 04/Nov/18 Resolved: 14/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.4.9 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | shawn | Assignee: | Kelsey Schubert |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
hi, we use hashed sharding cluster and find some orphaned document , some logs from mongodb log: 2017-12-29T10:24:13.476+0800 I SHARDING [conn1255226] rangeDeleter deleted 0 documents for geo.geo_position from { bssid: -8578565845206905770 }-> { bssid: -8573966000237967271 }all of these logs are deleted 0 documents. is it just suitable for ranged sharding cluseter ? |
| Comments |
| Comment by shawn [ 14/Oct/18 ] |
|
HI
We gave up using mongodb in this case.
Thanks. |
| Comment by Kelsey Schubert [ 12/Oct/18 ] |
|
Hi shawn001, Sorry for the delay getting back to you. Periodically, I've been looking back at this ticket trying different approaches to repro the behavior that you're describing without much luck. Is this still an issue for you? I would expect that that in the example above, "bsid" : "a6:21:00:00:2f:36" would be hashed to -8248819770576429154 so that's the range to pay attention to when running the cleanupOrphan command. If you're still encountering this issue, the next diagnostic steps would require access to the files in your $dbpath, is this something that you would be able to provide if we provided a secure upload portal? Kind regards, |
| Comment by shawn [ 31/Dec/17 ] |
|
Hi when i executed clean orphaned document command , i find a document which has knowed from two shard, it still exists in two shards. shard1:PRIMARY> db.table.find( {"bsid": "a6:21:00:00:2f:36"}) { "_id" : ObjectId("5a3927bd4cd0886da42fe3e5"), "bsid" : "a6:21:00:00:2f:36", "diam" : -1, "sid" : "JS-AP", "calculateDate" : ISODate("2017-12-22T23:59:59Z"), "weight" : 0, "imeiCount" : 50, "source" : "calculate_tracking", "flag" : 0",accuracy" : 500 }shard3:PRIMARY> db.table.find( {"bsid": "a6:21:00:00:2f:36"}) { "_id" : ObjectId("5a3927bd4cd0886da42fe3e5"), "bsid" : "a6:21:00:00:2f:36", "diam" : -1, "sid" : "JS-AP", "calculateDate" : ISODate("2017-12-17T23:59:59Z"), "weight" : 0, "imeiCount" : 9, "source" : "calculate_tracking", "flag" : 0, "accuracy" : 500 } |
| Comment by Kelsey Schubert [ 29/Dec/17 ] |
|
Hi shawn001, Would you please provide a query (run directly against the mongod, not through the mongos) that shows an orphan document that is not cleaned up by the command? Thank you, |