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

[stepdown] Make "start blocking" write's onAbort handler call TenantMigrationAccessBlocker::rollBackStartBlocking

    • Fully Compatible
    • Sharding 2020-10-05, Sharding 2020-10-19
    • 30

      Update rollback() method of the TenantMigrationDonorHandler class described in SERVER-49178 to call rollBackStartBlocking if the _state is “start blocking”, and move mtab->startBlockingWrites so that it is called after the "start blocking" update's WUOW is created.

      This way:

      •  if the "start blocking" update commits, then if the node steps down and the new primary does not have the "start blocking" update (and therefore tries to do the "start blocking" update again), the old primary would have had to go through rollback
      • if the "start blocking" update aborts, then the mtab->startBlockingWrites will get undone through the rollback() handler

      Note that though the rollback() handler can run at an arbitrary point after the WUOW aborts, any locks held in the WUOW will have their lifetime extended until all the rollback() handlers have run. This means if the write aborted due to stepdown, the stepdown will block until the write's rollback() handler runs.

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: