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

Acceptable time skew for C*

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.0.12, 2.1.2, 2.2.0 beta 1
    • None
    • None

    Description

      It is very hard to know the bounds on clock skew required for C* to work properly. Since the resolution is based on time and is at thrift column level, it depends on the application. How fast is the application updating the same column. If you update a column say after 5 millisecond and the clock skew is more than that, you might not see the updates in correct order.

      In this JIRA, I am proposing a change which will answer this question: "How much clock skew is acceptable for a given application". This will help answer the question whether the system needs some alternate NTP algorithms to keep time in sync.

      If we measure the time difference between two updates to the same column, we will be able to answer the question on clock skew.
      We can implement this in memtable(AtomicSortedColumns.addColumn). If we find that a column is updated within say 100 millisecond, add the diff to a histogram. Since this might have performance issues, we might want to have some throttling like randomization or only enable it for a small time via nodetool.

      With this histogram, we will know what is an acceptable clock skew.
      Also apart from column resolution, is there any other area which will be affected by clock skew?

      Note: For the sake of argument, I am not talking about back date deletes or application modified timestamps.

      Attachments

        1. 2.0_7979_v2.txt
          11 kB
          Sankalp Kohli
        2. 2.0_7979_v3.txt
          11 kB
          Sankalp Kohli
        3. 2.0_7979.diff
          10 kB
          Sankalp Kohli
        4. 2.1_7979_v2.txt
          8 kB
          Sankalp Kohli
        5. trunk_7979_v2.txt
          9 kB
          Sankalp Kohli
        6. trunk_7979.diff
          8 kB
          Sankalp Kohli

        Activity

          People

            kohlisankalp Sankalp Kohli
            kohlisankalp Sankalp Kohli
            Sankalp Kohli
            Joshua McKenzie
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: