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

ReplicationCoordinatorImpl should hold DataReplicator with shared pointer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.3.15
    • Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2016-08-29, Repl 2016-09-19, Repl 2016-10-10

    Description

      The ReplicationCoordinatorImpl currently uses a unique pointer to hold onto the DataReplicator. When we call doInitialSync, the pointer is not locked, so another thread could reset the pointer before the call, like resync.

      Using a shared pointer will fix this and make it so we no longer needed to synchronize on the pointer use, only when replaced/swapped. Each user of the current DataReplicator would make a copy of the shared_ptr which will stay valid. The sequence of events

      Tests
      A test to prove correctness will be concurrent resync requests during initial sync, or at all. Each resync will stop an existing initial-sync/resync and start a new initial sync, optionally waiting till completion.

      Attachments

        Issue Links

          Activity

            People

              scotthernandez Scott Hernandez
              judah.schvimer@mongodb.com Judah Schvimer
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: