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

          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?
          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 -

          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
          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)

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development