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

CQL: disallow counter update with "USING TIMESTAMP" and "USING TTL"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.16, 2.0.6, 2.1 beta1
    • None
    • None
    • Low

    Description

      Timestamps are not used by counters and TTL are not supported, but it appears we don't reject counter updates that have "USING TIMESTAMP X" or "USING TTL X". We should since both are non-sensical (the value is completely ignored currently).

      Note: we should also refuse "USING TIMESTAMP" on "DELETE" statements on counters table: even though we kind of do use a timestamp internally, it's more of an implementation detail and in fact may go away with CASSANDRA-6506 (there is also nothing clever you can do with it by providing it client side).

      Note bis: strictly speaking doing that could break a few users that where setting those thinking it does something. I think that the lack of validation is more of a bug and that user that think it's doing something probably ought to know it's not sooner than later, but I could be fine with just warning in the log file for 1.2 and 2.0, and only rejecting in 2.1 if someone thinks it's safer.

      Attachments

        1. 6649-2.0.txt
          2 kB
          Aleksey Yeschenko
        2. 6649-2.1.txt
          2 kB
          Aleksey Yeschenko

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: