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

Single-phase index builds perform un-timestamped catalog writes on abort

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.4, 5.1.0-rc0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.0
    • Sprint:
      Execution Team 2021-10-04, Execution Team 2021-10-18
    • Linked BF Score:
      139

      Description

      When applying oplog entries from a tenant migration, single-phase index builds that get aborted due to some external event, like a replication state transition, perform un-timestamped catalog writes.

      Single-phase index builds timestamp the first catalog write to add the index entry here. This uses the onStartIndexBuildSinglePhase OpObserver to generate a timestamp by writing a no-op oplog entry. However, if the index build gets interrupted, it needs to remove the index entry from the catalog by performing another write. Today, this second catalog write is un-timestamped and triggers an invariant.

      We'd probably have to do something similar that we do for the first catalog write, by writing a no-op oplog entry to generate a timestamp.

        Attachments

          Activity

            People

            Assignee:
            gregory.wlodarek Gregory Wlodarek
            Reporter:
            gregory.wlodarek Gregory Wlodarek
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: