Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
Post-Helium
-
None
-
None
-
Operating System: All
Platform: All
-
3028
Description
Reviewing of Shard/ShardCommitCoordinator/CohortEntry interactions I found that CohortEntry uses System.currentTimeMilis() to track last access time.
System.currentTimeMilis() is based on calender time, so it has things like leap seconds and is affected by NTP.
Shard.handleTransactionCommitTimeoutCheck(), which is called periodically can abort a transaction prematurely or fail to take action if the calendar time moves.
Use a Guava Stopwatch instead, as that is tied to the platform nanoTime source via a replaceable Ticker (for unit testing).