[SERVER-45733] Remove dead code which explicitly tries to set ghost timestamp in IndexBuildsManager::commitIndexBuild Created: 23/Jan/20  Updated: 29/Oct/23  Resolved: 24/Mar/20

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

Type: Task Priority: Major - P3
Reporter: Suganthi Mani Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-45028 move timestamping logic for completin... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-04-06
Participants:

 Description   

IndexBuildsManager::commitIndexBuild() currently gets called in 4 places.

1) startup recovery - which does non-timestamped writes.
2) Index build via coordinator (both primary and secondary) - 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.
3) SystemIndexBuild - Always runs on primary. so, need of ghost timestamp.
4) Foreground index build on secondaries - Since it's inline. This also doesn't requires ghosty timestamp.

So, this piece of code acts as dummy. And, it's good to remove it so that it's easy for future readers.



 Comments   
Comment by Githook User [ 24/Mar/20 ]

Author:

{'email': 'daniel.gottlieb@mongodb.com', 'name': 'Daniel Gottlieb', 'username': 'dgottlieb'}

Message: SERVER-45733: Remove ghost timestamping that is now always a no-op.
Branch: master
https://github.com/mongodb/mongo/commit/40112eca43bbb3b84aa738bacec73c3a9e32e5b9

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