[SERVER-47439] IndexBuildsCoordinator::createIndexes() should generate createIndexes oplog entry (single phase index build) for building indexes on empty collection. Created: 09/Apr/20  Updated: 29/Oct/23  Resolved: 23/Apr/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.4.0-rc4, 4.7.0

Type: Task Priority: Major - P3
Reporter: Suganthi Mani Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-47182 Single-phase index builds should run ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Execution Team 2020-05-04
Participants:

 Description   

jSince, on primary, we use IndexBuildsCoordinator::createIndexes() only to build system indexes and does not use the thread pool, I feel this createIndexes() should always generate the createIndexes oplog entry for the index build, considering it as a single phase index build. Also, building system indexes takes less time. So, it's ok for secondaries to do the system index build as foreground index build during steady state replication. By this we can make the behavior of not using thread pool consistent between primary and secondary.

To be noted, it seems, this createIndexes() is called to
1) create system Indexes during startup (writes not replicated).
2) create system Indexes during primary drain phase (writes replicated).
3) Secondaries oplog applier performing foreground index building.



 Comments   
Comment by Githook User [ 05/May/20 ]

Author:

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

Message: SERVER-47439 build system indexes single-phased

(cherry picked from commit 906e1a72f98d42106c02914bf9cc1dd3101483ac)
Branch: v4.4
https://github.com/mongodb/mongo/commit/c746480883a9bef1d6eb43149df9ec3a51cf1c12

Comment by Githook User [ 23/Apr/20 ]

Author:

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

Message: SERVER-47439 build system indexes single-phased
Branch: master
https://github.com/mongodb/mongo/commit/906e1a72f98d42106c02914bf9cc1dd3101483ac

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