[SERVER-57759] Run movePrimary command before sharding the source collection in the ReshardingTest fixture Created: 16/Jun/21  Updated: 29/Oct/23  Resolved: 30/Jun/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.2, 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Luis Osta (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-54231 Resharding can leave behind local col... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding 2021-07-12
Participants:
Linked BF Score: 28
Story Points: 1

 Description   

If one of the recipient-only shards happens to be chosen as the primary shard, and then the collection is sharded, subsequent movePrimary command leaves behind an empty source collection on the recipient shard. This can lead to ReshardingTest#_checkRecipientPostState() failing when the resharding operation isn't expected to succeed.

Running the movePrimary command before the shardCollection command avoids the issue described in SERVER-54231.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 27/Jul/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-57759 Run movePrimary command before sharding the source collection in the ReshardingTest fixture
Branch: v5.0
https://github.com/mongodb/mongo/commit/292b0ee13aed4689714ab506703bd6eb92785ad5

Comment by Githook User [ 30/Jun/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-57759 Run movePrimary command before sharding the source collection in the ReshardingTest fixture
Branch: master
https://github.com/mongodb/mongo/commit/47ca508496829cc4d44db2a835b7740bb22791c9

Comment by Max Hirschhorn [ 28/Jun/21 ]

Running the movePrimary command before the shardCollection command likely means the ReshardingTest fixture needs to get run the enableSharding command itself first.

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