[SERVER-68126] Check for negative maxChunkSize input value in AutoSplitVector Created: 19/Jul/22  Updated: 29/Oct/23  Resolved: 28/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.24, 4.4.19, 5.0.13, 6.0.2, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: None
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:
v6.0, v5.3, v5.0, v4.4, v4.2
Sprint: Sharding EMEA 2022-07-25, Sharding EMEA 2022-08-08
Participants:
Linked BF Score: 35

 Description   

In AutoSplitVector/SplitVector commands we should check if the maxChunkSize input parameter is negative before to convert the value to MiB (shift left << 20).

We already tried to fix this in SERVER-62205 but we added the sanity check only after the shift operation, thus we simply need to move the check before the shift operation.



 Comments   
Comment by Githook User [ 04/Nov/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-68126 Check constraints for maxChunkSize param in auto/splitVector commands

(cherry picked from commit 50b526fecf6e13b2ac8541b69564f368ac17a8ac)
(cherry picked from commit a80813750a255a19690ef3335438091415f8b525)
Branch: v4.2
https://github.com/mongodb/mongo/commit/a7d307ecb1a97c286c2e1084a92dead054ebd270

Comment by Githook User [ 03/Nov/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-68126 Check constraints for maxChunkSize param in auto/splitVector commands

(cherry picked from commit 50b526fecf6e13b2ac8541b69564f368ac17a8ac)
Branch: v4.4
https://github.com/mongodb/mongo/commit/a80813750a255a19690ef3335438091415f8b525

Comment by Githook User [ 12/Sep/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-68126 Check constraints for maxChunkSize param in auto/splitVector commands
Branch: v5.0
https://github.com/mongodb/mongo/commit/50b526fecf6e13b2ac8541b69564f368ac17a8ac

Comment by Githook User [ 23/Aug/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-68126 Check constraints for maxChunkSize param in auto/splitVector commands

(cherry picked from commit b9f4378d3d65352e208c7f0e46e181e815251780)
Branch: v6.0
https://github.com/mongodb/mongo/commit/a1051719e1a61b47396b924732e20490f17472b5

Comment by Githook User [ 28/Jul/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-68126 Check constraints for maxChunkSize param in auto/splitVector commands
Branch: master
https://github.com/mongodb/mongo/commit/b9f4378d3d65352e208c7f0e46e181e815251780

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