[SERVER-27746] Integrate LogicalClock with oplog Created: 19/Jan/17  Updated: 05/Apr/17  Resolved: 15/Feb/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.5.4

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Misha Tyulenev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-02-13, Sharding 2017-03-06
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 15/Feb/17 ]

Author:

{u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}

Message: SERVER-27746: Integrate LogicalClock with oplog
Branch: master
https://github.com/mongodb/mongo/commit/7d36244539cff23adb813f9cc006b1e9fe4305e0

Generated at Thu Feb 08 04:16:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.