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

Prevent logical clock from advancing while it's disabled

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.0.0-rc0
    • 3.7.7
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2018-05-21
    • 56

    Description

      A race condition exists in the following situation:

      1. A call to readRequestMetadata can pass the check for the logical clock's being enabled.
      2. A node can transition to an arbiter on another thread, disabling the logical clock.
      3. readRequestMetadata can attempt to advance the logical clock, tripping the invariant that the logical clock is enabled.

      Relevant lines are here:

      1. https://github.com/mongodb/mongo/blob/b7b55e75bbf18bcd7e38fdee430e0fd972183f68/src/mongo/rpc/metadata.cpp#L93
      2. https://github.com/mongodb/mongo/blob/b7b55e75bbf18bcd7e38fdee430e0fd972183f68/src/mongo/db/repl/replication_coordinator_impl.cpp#L569
      3. https://github.com/mongodb/mongo/blob/b7b55e75bbf18bcd7e38fdee430e0fd972183f68/src/mongo/rpc/metadata.cpp#L112

      Attachments

        Activity

          People

            jack.mulrow@mongodb.com Jack Mulrow
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: