[SERVER-45028] move timestamping logic for completing single-phased index builds within IndexBuildsCoordinator Created: 09/Dec/19  Updated: 29/Oct/23  Resolved: 13/Dec/19

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

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
Problem/Incident
is caused by SERVER-44186 allow index builds to continue runnin... Closed
Related
is related to SERVER-45733 Remove dead code which explicitly tri... Closed
is related to SERVER-45064 Stop replicating startIndexBuild and ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2019-12-16
Participants:
Linked BF Score: 78

 Description   

Single phased index build currently obtain a ghost timestamp for completing the index build on secondaries in the IndexBuildsCoordinator::onCommitIndexBuild() callback. Unfortunately, this only occurs under feature compatibility version 4.4. We should consider moving this logic to the onCreateIndex() callback where it will not be be affected by the current FCV.



 Comments   
Comment by Suganthi Mani [ 27/Dec/19 ]

benety.goh, since onCreateEachFn & onCommitFn now sets the ghost timestamp for catlog writes on secondaries (w/ FCV set to 4.2 & 4.4), then what's the purpose of calling IndexTimestampHelper::setGhostCommitTimestampForCatalogWrite here. Also, that line doesn't do anything because requiresGhostCommitTimestampForWrite() will return false asĀ writesAreReplicated() returns false at that point. Is there any plan to remove that line to make it easy for future readers?

Comment by Benety Goh [ 16/Dec/19 ]

This issue was introduced in SERVER-44186 in this commit. The ghost timestamp for the a single phased index build on a secondary is assigned in the onCommitIndexBuild() only in FCV 4.4.

Comment by Githook User [ 13/Dec/19 ]

Author:

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

Message: SERVER-45028 obtain ghost timestamp to complete single phased index builds on secondaries
Branch: master
https://github.com/mongodb/mongo/commit/5438b80801079d2eca1ca55e99952c709630a657

Comment by Benety Goh [ 11/Dec/19 ]

There is some cleanup to be done for the single-phased index build completion timestamp in IndexBuildsCoordinator but this is better handled as part of SERVER-45064

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