Cassandra
  1. Cassandra
  2. CASSANDRA-4251

when loading schema make sure the key and value are not present in the cfIdMap (BiDiMap)

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Cannot Reproduce
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      google bidimap throws an uncaught runtime exception with less than informative information when the cfid already exists in the cfIDMap has it as a value. Add a check to the preflight check of the Schema class instead, so there is better messaging.

        Issue Links

          Activity

          Dave Brosius created issue -
          Hide
          Dave Brosius added a comment -

          java.lang.IllegalArgumentException: value already present: 1034
          at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115)
          at com.google.common.collect.AbstractBiMap.putInBothMaps(AbstractBiMap.java:111)
          at com.google.common.collect.AbstractBiMap.put(AbstractBiMap.java:96)
          at com.google.common.collect.HashBiMap.put(HashBiMap.java:84)
          at org.apache.cassandra.config.Schema.load(Schema.java:385)
          at org.apache.cassandra.config.Schema.load(Schema.java:106)
          at org.apache.cassandra.config.Schema.load(Schema.java:91)

          Show
          Dave Brosius added a comment - java.lang.IllegalArgumentException: value already present: 1034 at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115) at com.google.common.collect.AbstractBiMap.putInBothMaps(AbstractBiMap.java:111) at com.google.common.collect.AbstractBiMap.put(AbstractBiMap.java:96) at com.google.common.collect.HashBiMap.put(HashBiMap.java:84) at org.apache.cassandra.config.Schema.load(Schema.java:385) at org.apache.cassandra.config.Schema.load(Schema.java:106) at org.apache.cassandra.config.Schema.load(Schema.java:91)
          Dave Brosius made changes -
          Field Original Value New Value
          Attachment better_schema_load_exs.diff [ 12527616 ]
          Dave Brosius made changes -
          Attachment better_schema_load_exs.diff [ 12527616 ]
          Dave Brosius made changes -
          Attachment better_schema_load_exs.diff [ 12527620 ]
          Hide
          Jonathan Ellis added a comment -

          Can you reproduce this? Multiple CFs w/ the same id sounds like a pretty nasty bug.

          Show
          Jonathan Ellis added a comment - Can you reproduce this? Multiple CFs w/ the same id sounds like a pretty nasty bug.
          Hide
          Brandon Williams added a comment -

          Saw this on irc:

          < Guest89350> hello, please help, after upgrading my cluster from 1.0.8 to 1.1.0 startup fails with: java.lang.IllegalArgumentException: value already present:1034

          Show
          Brandon Williams added a comment - Saw this on irc: < Guest89350> hello, please help, after upgrading my cluster from 1.0.8 to 1.1.0 startup fails with: java.lang.IllegalArgumentException: value already present:1034
          Hide
          Jonathan Ellis added a comment -

          We don't change CF IDs during the upgrade. So does that mean "after upgrading and doing concurrent schema updates and hitting CASSANDRA-3794?" Or something else entirely?

          Show
          Jonathan Ellis added a comment - We don't change CF IDs during the upgrade. So does that mean "after upgrading and doing concurrent schema updates and hitting CASSANDRA-3794 ?" Or something else entirely?
          Brandon Williams made changes -
          Link This issue is related to CASSANDRA-4323 [ CASSANDRA-4323 ]
          Jonathan Ellis made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Cannot Reproduce [ 5 ]
          Gavin made changes -
          Workflow no-reopen-closed, patch-avail [ 12668142 ] patch-available, re-open possible [ 12753026 ]
          Gavin made changes -
          Workflow patch-available, re-open possible [ 12753026 ] reopen-resolved, no closed status, patch-avail, testing [ 12755691 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Dave Brosius
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development