[SERVER-83369] Index creation does not enforce type of bucketSize field Created: 16/Nov/23  Updated: 11/Jan/24  Resolved: 03/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.1, 7.3.0-rc0, 7.0.6, 5.0.25, 6.0.14

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Assigned Teams:
Storage Execution
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Requested:
v7.2, v7.0, v6.0, v5.0
Sprint: Execution Team 2024-01-08
Participants:
Linked BF Score: 5

 Description   

When running the createIndexes command, if the bucketSize field is provided then it is supposed to be a number. This should be enforced by the index_key_validate::validateIndexSpec function, but it is not. Thus any type can be provided for bucketSize and it will be persisted in the catalog as such.



 Comments   
Comment by Githook User [ 11/Jan/24 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-83369 Enforce type of `bucketSize` on index creation (#17846)

(cherry picked from commit 65c35f63bc676fe40986e45bd0eafe22fcbdecd8)

GitOrigin-RevId: 52748249f62e3a07e071dde3ef6729ebda900f84
Branch: v5.0
https://github.com/mongodb/mongo/commit/b5b990e08f35ea40c6eac776355204dac35e32a8

Comment by Githook User [ 10/Jan/24 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-83369 Enforce type of `bucketSize` on index creation (#17846)

(cherry picked from commit 65c35f63bc676fe40986e45bd0eafe22fcbdecd8)

GitOrigin-RevId: d5b8d381f12ae16bcc8e577968350ba358caf7fe
Branch: v6.0
https://github.com/mongodb/mongo/commit/ae260a5ce7199c12db062b563acef86b735be706

Comment by Githook User [ 10/Jan/24 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-83369 Enforce type of `bucketSize` on index creation (#17846)

(cherry picked from commit 65c35f63bc676fe40986e45bd0eafe22fcbdecd8)
Branch: v7.2
https://github.com/mongodb/mongo/commit/8b8bcfc57eaced80e666f31b01a907ef384d50d9

Comment by Githook User [ 10/Jan/24 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-83369 Enforce type of `bucketSize` on index creation (#17846)

(cherry picked from commit 65c35f63bc676fe40986e45bd0eafe22fcbdecd8)

GitOrigin-RevId: 837c88e529e63e077a3de062bdc3b09ab183b3d0
Branch: v7.0
https://github.com/mongodb/mongo/commit/c49aa429e2421595803998b2c11214feac8359b6

Comment by Githook User [ 03/Jan/24 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-83369 Enforce type of `bucketSize` on index creation (#17846)

GitOrigin-RevId: 65c35f63bc676fe40986e45bd0eafe22fcbdecd8
Branch: master
https://github.com/mongodb/mongo/commit/daaba8ced76df8dbb0ad982e8c576e39ad26419c

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