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

Remove race on backupCursorKeepAliveFuture in file copy based initial sync shutdown

    • 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 (Inactive)
            Reporter:
            frederic.vitzikam@mongodb.com Frederic Vitzikam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: