Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1265

Clustering: fix time tracking in ShardCommitCoordinator

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • Post-Helium
    • None
    • mdsal
    • 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).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpantelis Tom Pantelis
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: