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

Integrate LogicalClock with oplog

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.4
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • Sharding 2017-02-13, Sharding 2017-03-06

      Once this task is implemented we will have functionally equivalent to existing global_timestamp implementation that uses LogicalClock and LogicalTime classes.
      The follow up performance test is required to confirm that the mutex based serialization does not introduce performance degradation.

      1) Add LogicalClock to serverContext
      To place it on ServiceContext add member

      std::unique_ptr<LogicalClock> _logicalClock;
      

      and provide an accessor

      LogicalClock* getLogicalClock() const;
      

      2) use LogicalClock with oplog instead of global_timestamp defined function calls.
      This will include changing the set(time)

      { return (time +1) }

      get()

      {return time-1 }

      behavior
      https://github.com/mikety/mongo/blob/v3.4/src/mongo/db/global_timestamp.cpp#L44-L51

      Its implemented this way to support reserving ticks currently needed at oplog https://github.com/mikety/mongo/blob/v3.4/src/mongo/db/repl/oplog.cpp#L162

      3) replace all usages of global_timestamp defined function calls and remove the file.

      4) verify that there are no BF.

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: