[SERVER-27743] Implement LogicalTime Created: 18/Jan/17  Updated: 10/May/18  Resolved: 02/Feb/17

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

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

Issue Links:
Documented
Duplicate
is duplicated by SERVER-27717 Implement Logical Time Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-02-13
Participants:

 Description   

The LogicalTime class contains the time and defines the operations allowed with this time.

class LogicalTime {
  public:
      LogicalTime();
      LogicalTime(Timestamp);
      
      LogicalTime(const LogicalTime&) = default;
      LogicalTime(LogicalTime&&) = default;
  
      LogicalTime& operator=(const LogicalTime&) = default;
      LogicalTime& operator=(LogicalTime&&) = default;
 
      Timestamp asTimestamp() const;
 
      // increments the clock
      void addTicks(unsigned ticks); 
      std::string toString() const;
 
  private:
     uint64_t _time{0};
  };

Add unit tests to validate the API



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

Author:

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

Message: SERVER-27743: Implement LogicalTime
Branch: master
https://github.com/mongodb/mongo/commit/c742c4ebe789fafa3fccd4b25332a7df0782b252

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