[SERVER-62690] Shard is shutting down before finishing draining in test Created: 17/Jan/22  Updated: 29/Oct/23  Resolved: 13/Apr/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.3.2, 5.0.8, 6.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Allison Easton
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.3, v5.0
Sprint: Sharding EMEA 2022-04-18
Participants:
Linked BF Score: 18

 Description   

auth_add_shard.js is relying on removeShard to wait until the removed shard is fully drained before shutting down, however, remove shard works at the config server level, and it only checks if the shard has no chunks, so we might end up in a situation where the last migration just committed to the config server, but before cleaning up, which includes starting the source shard range deletion, removing the destination shard range deletion document and removing the migration coordinator document.

We should wait not only for the removeShard to be successful, but also to ensure there is no migration coordinator document on the donor shard, meaning, the last migration has successfully transfer the latest chunk to the destination shard, and all cleanup processes are finished.



 Comments   
Comment by Githook User [ 19/Apr/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-62690 Shard is shutting down before finishing draining in test

(cherry picked from commit 9f06d30d0701e6b224598e19b5d63a257f4ed554)
Branch: v5.0
https://github.com/mongodb/mongo/commit/2998287dbeba3a729258693ae9056fc762d724e4

Comment by Githook User [ 19/Apr/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-62690 Shard is shutting down before finishing draining in test

(cherry picked from commit 9f06d30d0701e6b224598e19b5d63a257f4ed554)
Branch: v5.3
https://github.com/mongodb/mongo/commit/169a54fd049eba6e0f522fce9d9907d9ab64bb50

Comment by Githook User [ 12/Apr/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-62690 Shard is shutting down before finishing draining in test
Branch: master
https://github.com/mongodb/mongo/commit/9f06d30d0701e6b224598e19b5d63a257f4ed554

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