[SERVER-74747] Deprecate `numInitialChunks` parameter of `shardCollection` command Created: 10/Mar/23  Updated: 19/Jan/24  Resolved: 07/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Robert Sander
Resolution: Fixed Votes: 0
Labels: car-qw, nomas-1-cleanup, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-82611 Remove the 'numInitialChunks' paramet... Closed
Documented
is documented by DOCS-16479 Investigate changes in SERVER-74747: ... Closed
Problem/Incident
causes SERVER-83005 Reintroduce numInitialChunks paramete... Closed
Related
related to SERVER-83006 Remove deprecated numInitialChunk par... Backlog
related to SERVER-76405 Reduce the initial minimum number of ... Closed
is related to SERVER-81884 Get rid of featureFlagOneChunkPerShar... Open
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-06-26, Sharding EMEA 2023-07-10, Sharding EMEA 2023-07-24, Sharding EMEA 2023-08-07, Sharding EMEA 2023-10-02, Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30, CAR Team 2023-11-13
Participants:
Linked BF Score: 20
Story Points: 1

 Description   

The numInitialChunks parameter can be used to spread chunks across shards when sharding an empty collection with hashed shard key. Considering that the auto splitter gone away and that the number of chunks does not matter anymore, this option has no real value anymore.



 Comments   
Comment by Githook User [ 07/Nov/23 ]

Author:

{'name': 'Robert Sander', 'email': 'robert.sander@mongodb.com', 'username': 'robsndr'}

Message: SERVER-74747 Deprecate numIntialChunks parameter for ShardCollection
Branch: master
https://github.com/mongodb/mongo/commit/cbbe4fe36cb6367424bac0fecc803342b1c1c9ec

Comment by Pau Baldillou Salse (Inactive) [ 19/Jul/23 ]

Several tests are affected by this change, since numInitialChunks  should no longer be used. Most of them should be deleted or adapted to the default behaviour. At the time of writing, this is 2 chunks per shard, but there's another ticket that aims to change the behaviour for sharding an empty collection with hashed shard key to 1 chunk per shard. 

Evergreen patch with the changes about the parameter and the affected tests. The tests changes should be revised once the default behaviour becomes one chunk per shard.

Comment by Antonio Fuschetto [ 12/Jul/23 ]

After an internal discussion with the product manager, we decided that the best approach is to get rid of this argument starting from version 7.1. The shardCollection command silently ignores unknown options, implying that the numInitialChunks argument will fall into this category. As a consequence, any exiting scripts used by clients will continue to work (no syntax error).

Comment by Antonio Fuschetto [ 20/Jun/23 ]

The numInitialChunks parameter of shardCollection command has been deprecated by logging a warning message. Out of the scope of this ticket, we should consider to do the same for the reshardCollection command and, in a subsequent major version, to get rid of this parameter from all the involved commands. Obviously, this also implies a public documentation changes.

Generated at Thu Feb 08 06:28:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.