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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.4, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • Execution Team 2021-10-04, Execution Team 2021-10-18
    • 139

      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.

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

              Created:
              Updated:
              Resolved: