[SERVER-24235] Improve misleading message "... this shard does not contain the chunk" reported if migration cannot start Created: 20/May/16  Updated: 06/Dec/22  Resolved: 11/Jun/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.0.12, 3.2.6
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Kaloian Manassiev Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Done Votes: 0
Labels: Sharding-EMEA, neweng, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding EMEA
Sprint: Sharding 16 (06/24/16)
Participants:

 Description   

If the recipient shard fails to start migration early in the cycle, before it has installed the pending chunk into the metadata, its cleanup code will still try to clean it up.

This results in a misleading message in the logs:

2016-05-20T13:10:50.088+0100 I SHARDING [migrateThread] starting receiving-end of migration of chunk { files_id: MinKey, n: MinKey } -> { files_id: ObjectId('000085341e8011e6a61c8380'), n: 0 } for collection db.coll from rs/host1:38101,host2:38102 at epoch 573c7245e4f3add3194fa270
2016-05-20T13:10:50.089+0100 W SHARDING [migrateThread] failed to create index before migrating data.  error: IndexOptionsConflict: Index with name: files_id_1_n_1 already exists with different options
...
2016-05-20T13:10:50.091+0100 W SHARDING [migrateThread] cannot remove pending chunk [{ files_id: MinKey, n: MinKey }, { files_id: ObjectId('000085341e8011e6a61c8380'), n: 0 }), this shard does not contain the chunk

We should make sure to not do this cleanup if the pending chunk range has not been installed in the metadata.



 Comments   
Comment by Tommaso Tocci [ 11/Jun/21 ]

This code has changed significantly since 3.6 so this is no longer a problem.

Comment by Tommaso Tocci [ 10/Jun/21 ]

kaloian.manassiev this ticket seems to only affect deprecated versions, do you think this is still applicable to newer versions?

Generated at Thu Feb 08 04:05:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.