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

replication_coordinator_impl_elect_v1_test.cpp tests need to ensure they have global lock before calling canAcceptWritesForDatabase

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.7
    • Affects Version/s: None
    • Component/s: Replication
    • Fully Compatible
    • Repl 2017-05-08
    • 0

      Several unit tests call canAcceptWritesForDatabase after attempting to take the global IX lock with a 1 millisecond timeout. If the global lock acquisition failed, then the call to canAcceptWritesForDatabase will trigger an invariant.

      I think we should just remove the 1ms lock acquisition timeout and make the test wait unconditionally for the lock.

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: