Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-5581

Use System.nanoTime() to measure intervals

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.0 beta 1
    • None
    • None

    Description

      System.nanoTime() should always be prefered to System.currentTimeMillis() to measure time intervals. It's not affected by system clock adjustments & drift.

      While testing C* we found that it's very unstable if system clock drifts. Problems happen even under low load with tiny dataset. In our case other VMs on the same hardware box produced high CPU load and system clock drifted a lot in C* VMs. We fixed that but there is definitelly room for improvement in C* itself.

      Attachments

        1. 5581-v2.txt
          55 kB
          Jonathan Ellis
        2. trunk-5581.txt
          53 kB
          Mikhail Mazursky
        3. trunk-5581-v3.txt
          55 kB
          Mikhail Mazursky

        Activity

          People

            ash2k Mikhail Mazursky
            ash2k Mikhail Mazursky
            Mikhail Mazursky
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: