[SERVER-58342] Allow specifying of reshardCollection zones to be empty Created: 07/Jul/21  Updated: 29/Oct/23  Resolved: 29/Jul/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.0.0-rc8
Fix Version/s: 5.0.3, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Blake Oler Assignee: Haley Connelly
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-autocommits
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File repro.txt    
Issue Links:
Backports
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Steps To Reproduce:

1. Apply the attached diff
2. Run the reshard_collection_basic.js test to get the failure

Sprint: Sharding 2021-07-26, Sharding 2021-08-09
Participants:
Story Points: 1

 Description   

Steps

  1. Specify zones for a sharded collection
  2. Run reshardCollection with the zones argument specified, but empty.
  3. The server will error out here.

It is legal to specify an empty argument for zones even if there already exist zones in the collection – doing so should be equivalent to saying "the collection resharded under the new key should not use zones."

The solution lies in either allowing an empty zones object at the level of the initial split code, or feeding the initial split code boost::none if the zones object is empty at the level of the resharding coordinator.



 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 [ 17/Aug/21 ]

Author:

{'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}

Message: SERVER-58342 Allow specifying of reshardCollection zones to be empty

(cherry picked from commit 68f6c01d0f0452a9aef96e2da6289ce40fac2e41)
Branch: v5.0
https://github.com/mongodb/mongo/commit/ab120562f17f1ff040933ecd77088f78ac6fdc83

Comment by Githook User [ 29/Jul/21 ]

Author:

{'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}

Message: SERVER-58342 Allow specifying of reshardCollection zones to be empty
Branch: master
https://github.com/mongodb/mongo/commit/68f6c01d0f0452a9aef96e2da6289ce40fac2e41

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