futurewei-cloud/chogori-platform

Remove cached clock (need to measure performance metrics first)

Opened this issue · 0 comments

Detail Description:
The original CachedClock achieves fast ticking by simply increasing the timestamp by 1 unit of time when now() is called. When precise time comparison is needed, we need to set refresh to true to get the time from std::chrono::steady_clock. This is causing issue in the 3SITxnTest. When it is calling the doRead, if there is a conflict, it will be resolved using the push operation (K23SIPartitionModule::_doPush) in Module.cpp. This is taking in a fast deadline as a parameter. If not synced properly, this deadline will be way behind the actual time and causing other deadlines to break.

We need to measure the performance impact of the CachedClock against steady_clock. If there is no significant impact, we should remove the CachedClock.