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

If there are multiple values for a key, CQL grammar choses last value. This should not be silent or should not be allowed.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 3.11.0, 4.0
    • Component/s: Legacy/CQL
    • Labels:
      None
    • Severity:
      Low

      Description

      If through CQL, multiple values are specified for a key, grammar parses the map and last value for the key wins. This behavior is bad.
      e.g.

      CREATE KEYSPACE Excalibur WITH REPLICATION = {'class': 'NetworkTopologyStrategy', 'dc1': 2, 'dc1': 5};
      

      Parsing this statement, 'dc1' gets RF = 5. This can be catastrophic, may even result in loss of data. This behavior should not be silent or not be allowed at all.

        Attachments

        1. 3.X.diff
          6 kB
          Nachiket Patil
        2. trunk.diff
          6 kB
          Nachiket Patil
        3. test_stdout.txt
          117 kB
          Ariel Weisberg

          Activity

            People

            • Assignee:
              nachiket_patil Nachiket Patil
              Reporter:
              nachiket_patil Nachiket Patil
              Authors:
              Nachiket Patil
              Reviewers:
              Ariel Weisberg
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: