[SERVER-35235] plan_cache_index_create.js should build initial index set in the foreground Created: 25/May/18  Updated: 29/Oct/23  Resolved: 25/May/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.0.0-rc0
Fix Version/s: 3.6.9, 4.0.0, 4.1.1

Type: Improvement 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
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0, v3.6
Sprint: Query 2018-06-04
Participants:
Linked BF Score: 6

 Description   

Currently plan_cache_index_create.js starts with the creation of 2 baseline indexes using majority writeConcern and in the background. After creating we confirm that executing a find will generate a plan cache entry for the more optimal index. We run this test confirming both primary and secondary reads.

When reading from the secondary, the majority writeConcern background createIndexes invocation will confirm that the index build has completed on the primary and started on the secondary. It does not guarantee that it will be completed and available for a subsequent secondary read. We should change this specific index build to a foreground build which will ensure that we are blocked from reading on the secondary until the index build has completed.



 Comments   
Comment by Githook User [ 28/Sep/18 ]

Author:

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

Message: SERVER-35235 plan_cache_index_create.js should build initial index set in the foreground

(cherry picked from commit a98e8fb1230bfd0eb9e63c36540f4d789ae3fc99)
(cherry picked from commit 74d82fa72cfdebe7dddd8253703ad72fde63038e)
Branch: v3.6
https://github.com/mongodb/mongo/commit/e15dbd9c05977dbf316d275d94f048424cf28da5

Comment by Githook User [ 05/Jun/18 ]

Author:

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

Message: SERVER-35235 plan_cache_index_create.js should build initial index set in the foreground

(cherry picked from commit a98e8fb1230bfd0eb9e63c36540f4d789ae3fc99)
Branch: v4.0
https://github.com/mongodb/mongo/commit/74d82fa72cfdebe7dddd8253703ad72fde63038e

Comment by Githook User [ 25/May/18 ]

Author:

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

Message: SERVER-35235 plan_cache_index_create.js should build initial index set in the foreground
Branch: master
https://github.com/mongodb/mongo/commit/a98e8fb1230bfd0eb9e63c36540f4d789ae3fc99

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