[SERVER-37333] [3.4] applyOps does not validate background index spec for system.indexes inserts Created: 26/Sep/18  Updated: 29/Oct/23  Resolved: 01/Oct/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.4.18
Fix Version/s: 3.4.18

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
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-28594 non-atomic applyOps should log each i... Closed
is related to SERVER-36944 applyOps does not permit unknown fiel... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-10-08
Participants:
Linked BF Score: 1

 Description   

When applyOps is provided an insert operation into the system.indexes namespace for a background index, the command does not validate the index spec before handing off the index spec to a background thread to build the index. This could lead to an error in the background thread as it tries to initialize the MultiIndexBlock object.



 Comments   
Comment by Githook User [ 01/Oct/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-37333 applyOps builds background indexes in the foreground
Branch: v3.4
https://github.com/mongodb/mongo/commit/a70a8ce8cdc5734353acdd577956e58872169c64

Comment by Benety Goh [ 01/Oct/18 ]

Re-opening. It's insufficient to validate index specs prior to starting background build. There is a possibility that the collection could be removed before the background job starts the index build, leading to an fatal assertion.

Comment by Githook User [ 28/Sep/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: Revert "SERVER-37333 applyOps validates both background and foreground indexes for system.indexes inserts"

This reverts commit 606ed0eda1b0e3f0da66d63fd8a2e262cd0edc8b.
Branch: v3.4
https://github.com/mongodb/mongo/commit/15d15831540f2b59a889bdcb3fcf9725d6a23c96

Comment by Githook User [ 28/Sep/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-37333 applyOps validates both background and foreground indexes for system.indexes inserts
Branch: v3.4
https://github.com/mongodb/mongo/commit/606ed0eda1b0e3f0da66d63fd8a2e262cd0edc8b

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