[SERVER-18306] mongo shard remove fail with warning: cannot remove pending chunk [{ _id: -9037293457323899541 }, { _id: -9022987269115127569 }), this shard does not contain the chunk Created: 04/May/15  Updated: 04/May/15  Resolved: 04/May/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.6.7
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Stan Wong Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Hi,

I am using mongo 2.6 server and I have over 100k record in shard collection.

when I perform

db.runCommand( { removeShard: "shard_h" } )

few collection are manage to move except the 100krecord collection. I got this error on other shard mongo log.

2015-05-04T06:49:43.729+0000 [migrateThread] about to log metadata event: { _id: "server1-2015-05-04T06:49:43-554716878565296884b22213", server: "server2", clientAddr: ":27017", time: new Date(1430722183729), what: "moveChunk.to", ns: "data", details: { min: { _id: -9037293457323899541 }, max: { _id: -9022987269115127569 }, note: "aborted", errmsg: "aborting migration, shard is missing indexes and collection is not empty. Non-trivial index creation should be scheduled manually" } }
2015-05-04T06:49:43.738+0000 [migrateThread] warning: cannot remove pending chunk [{ _id: -9037293457323899541 }, { _id: -9022987269115127569 }), this shard does not contain the chunk
2015-05-04T06:49:43.738+0000 [migrateThread] warning: cannot remove pending chunk [{ _id: -9037293457323899541 }, { _id: -9022987269115127569 }), this shard does not contain the chunk



 Comments   
Comment by Sam Kleinman (Inactive) [ 04/May/15 ]

It looks like the "warning: cannot remove pending chunk" message is benign and is safe to ignore: the balancer is just attempting to remove an operation that never occurred.

The first error likely reports the blocking issue here: an index that exists on the shard that you're removing (i.e. the "from" shard in these migrations) does not exist on one of the target shards. If you generate a list of indexes on the collection (db.<collection>.getIndexes(), make sure that all these indexes exist on the target shard. When this is complete the migrations should be able to continue and the shard removal should work.

Because the SERVER project is for reporting bugs or feature suggestions for the MongoDB itself, I'm going to go ahead and close this ticket. If you have additional issues with the migration, those questions might be better addressed to one of the MongoDB-related support forums, such as the mongodb-users group or Stack Overflow with the mongodb tag.

Hope this help,
Sam

Generated at Thu Feb 08 03:47:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.