[SERVER-54706] listIndexes fails if an index has the wildcard weight "$**" Created: 22/Feb/21  Updated: 29/Oct/23  Resolved: 23/Feb/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-54712 createIndexes permits weights for non... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2021-03-08
Participants:
Linked BF Score: 18

 Description   

An index spec's "weights" field is normally an object, but it can also be the string "$**". InĀ SERVER-52545 we updated listIndexes to return an error if any index spec in the catalog does not match its expected format, and we incorrectly required "weights" to always be an object. Update the IDL definition for index specs to permit an object or a string.

(Note, "weights" has some other surprising behavior which I'm not fixing here. Deferred to SERVER-54712.)



 Comments   
Comment by Githook User [ 23/Feb/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-54706 Fix listIndexes with string-valued weight
Branch: master
https://github.com/mongodb/mongo/commit/3274c2a3d916cfc3e73c9020660fe4d0fb45ebf2

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