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

counters++ get rid of logical clock in global shards

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Not A Problem
    • 2.1 beta1
    • None
    • None

    Description

      In CASSANDRA-6504 the global shards still follow the

      {count, logical clock}

      pattern of the legacy shards. We could store the

      {increments, decrements}

      tuple in the shard instead, and for reconcile, instead of relying on the logical clock, pick the largest value of `increments` and `decrements` of the two shards, and use that.

      E.g., shard1:

      {2000, 1001}

      (total 999), shard2:

      {2001, 1000}

      (total 1001). reconciled =

      {max(2000, 2001), max(1001, 1000)}

      =

      {2001, 1001}

      (total 1000).

      While scenarios like this generally shouldn't happen post CASSANDRA-6504, this change costs us nothing, and makes issues like CASSANDRA-4417 theoretically impossible . This also makes our new implementation directly follow the http://hal.inria.fr/docs/00/55/55/88/PDF/techreport.pdf white paper.

      Attachments

        Activity

          People

            aleksey Aleksey Yeschenko
            aleksey Aleksey Yeschenko
            Aleksey Yeschenko
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: