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

Implement LogicalClockFixture

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.5.7
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding 2017-05-08

    Description

      Set up a mocked-up objects for testing replica-set causal consistent reads.
      The fixture should provide the following functionality:

      • set LogicalClock
      • write to an opLog
      • read from an opLog
      • write to secondary and primary nodes (separately by setting repl coordinator mode)
      • read from the secondary and primary nodes
      • clocksource skew
      • disable/enable readConcernMajority

      Implementation:

      • Use existing LogicalClockTest class can be used as a base, inherit from ShardingMongodTestFixture
      • override setUp to
        a) set up logicalClock on serviceContext
        b) add a clockSource mock
        c) add a keyManager mock
      • Integrate functionality from logical_clock_test.cpp and reuse the new fixture there.
      • Add one test that causes a write to opLog and check that the result matches the current clusterTime - may be using get lastAppliedOptime() method of replicationCoordinator

      Attachments

        Activity

          People

            jack.mulrow@mongodb.com Jack Mulrow
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: