[SERVER-37391] plan_cache_index_create.js should wait for index build start, rather than just createIndexes command start Created: 28/Sep/18  Updated: 29/Oct/23  Resolved: 12/Oct/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.0.2, 4.1.3
Fix Version/s: 3.6.10, 4.0.4, 4.1.5

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: James Wahlin
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:
v4.0, v3.6
Participants:
Linked BF Score: 4

 Description   

The plan_cache_index_create.js test checks currentOp to confirm that an index build is running. Once confirmed it assumes that the createIndexes command has cleared the plan cache. This is an incorrect assumption to make as the createIndexes command will be visible in currentOp on command execution, which is prior to the MultiIndexBlock::init() call which triggers a clearQueryCache() call further down the call stack.

Instead, we should confirm that the hangAfterStartingIndexBuild has been reached. Note that this change may not work for the calls to !indexBuildIsRunning() in this test, which can continue to use currentOp.



 Comments   
Comment by Githook User [ 21/Dec/18 ]

Author:

{'username': 'jameswahlin', 'email': 'james@mongodb.com', 'name': 'James Wahlin'}

Message: Message: SERVER-37391 plan_cache_index_create.js should wait for index build start, rather than just createIndexes command start

(cherry picked from commit c6bceb292246721c5a0950e84d6b71ee1bc04bdf)
Branch: v3.6
https://github.com/mongodb/mongo/commit/1ade014cb793d4969a83495546da53e6c02e0e5e

Comment by Githook User [ 12/Oct/18 ]

Author:

{'name': 'James Wahlin', 'email': 'james@mongodb.com', 'username': 'jameswahlin'}

Message: SERVER-37391 plan_cache_index_create.js should wait for index build start, rather than just createIndexes command start

(cherry picked from commit c6bceb292246721c5a0950e84d6b71ee1bc04bdf)
Branch: v4.0
https://github.com/mongodb/mongo/commit/dfd56919af95b1b586e1d160d576c5b009384305

Comment by Githook User [ 12/Oct/18 ]

Author:

{'name': 'James Wahlin', 'email': 'james@mongodb.com', 'username': 'jameswahlin'}

Message: SERVER-37391 plan_cache_index_create.js should wait for index build start, rather than just createIndexes command start
Branch: master
https://github.com/mongodb/mongo/commit/c6bceb292246721c5a0950e84d6b71ee1bc04bdf

Comment by Ian Whalen (Inactive) [ 11/Oct/18 ]

assigning to james to pick up for BF Friday tomorrow.

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