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)
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.