Remove race on backupCursorKeepAliveFuture in file copy based initial sync shutdown

XMLWordPrintableJSON

    • Replication
    • Fully Compatible
    • v8.0, v7.0, v6.0
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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 (Inactive)
              Reporter:
              Frederic Vitzikam (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: