[SERVER-40309] Remove bucketSize option from 2d index in geo_full.js Created: 22/Mar/19  Updated: 29/Oct/23  Resolved: 01/Jun/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.1.9
Fix Version/s: 4.7.0

Type: Improvement Priority: Minor - P4
Reporter: Louis Williams Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-06-01, Execution Team 2020-06-15
Participants:

 Description   

There are two issues with how we parse and validate index specs:
1. Each type of index (b-tree, text, etc.) is responsible for parsing its own options here, but we create the SortedDataInterface immediately beforehand. This stores the user-provided index spec in the catalog, and at some points does string parsing on that metadata. If the strings passed to the SDI are invalid, this can lead to undefined behavior or even crashes.
2. It's possible to pass unrecognized options to an index type (ex: pass 'bucketSize' to a text index), and that may still get persisted in the storage engine. This may also introduce a crash or undefined behavior.



 Comments   
Comment by Gregory Noma [ 02/Jun/20 ]

Githook didn't post.

Author:

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

Message: SERVER-40309 Remove bucketSize option from 2d index in geo_full.js
Branch: master
https://github.com/mongodb/mongo/commit/8bf94a6b123c4a8d60f7b7fd8fd860976a726fbf

Comment by Eric Milkie [ 27/May/20 ]

Will this work be difficult to support for downstream? For example, if MongoMirror attempts to build an index and gets the spec, with unrecognized options, from a source node, what will happen if we start to reject this spec on the target node?

Generated at Thu Feb 08 04:54:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.