Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45733

Remove dead code which explicitly tries to set ghost timestamp in IndexBuildsManager::commitIndexBuild

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Storage
    • Fully Compatible
    • Execution Team 2020-04-06

      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.

            Assignee:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: