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

Remove race on backupCursorKeepAliveFuture in shutdown

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc10
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • v8.0, v7.0, v6.0
    • 200

      Checking backupCursorKeepAliveFuture outside of the _mutex is racy.

      One possible fix is to:

      • Mark backupCursorKeepAliveFuture as (M).
      • Move the check of _syncingFilesState.backupCursorKeepAliveFuture up into the _mutex.
      • If the check succeed, we need to wait AFTER the _mutex to avoid risks of deadlocks.
      • Add an if (_initialSyncCancellationSource.token().isCanceled()) in _keepBackupCursorAlive before setting the future.

            Assignee:
            frederic.vitzikam@mongodb.com Frederic Vitzikam
            Reporter:
            frederic.vitzikam@mongodb.com Frederic Vitzikam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: