Coverity: add GUARDED_BY to FileCopyBasedInitialSyncer and BackupFileCloner state fields

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      What

      Add `GUARDED_BY(_mutex)` to the state member fields in `FileCopyBasedInitialSyncer` and `BackupFileCloner` that are accessed without the mutex. Add `REQUIRES(_mutex)` to private helpers.

      Files: `file_copy_based_initial_syncer.cpp` (lines 924, 1603), `backup_file_cloner.cpp` (lines 241, 313).

      Resolves: SERVER-108707, SERVER-108727, SERVER-108706, SERVER-108711

      Why

      These fields are part of the FCBIS sync lifecycle and are accessed from multiple threads. Because Coverity cannot be run locally, `GUARDED_BY` annotations are the practical way to confirm the fix is complete and to catch future violations at build time.

            Assignee:
            Unassigned
            Reporter:
            Denis Trailin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: