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

Fix AlterTableStatement dropped type validation order

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 4.0-alpha1, 4.0
    • Component/s: Cluster/Schema
    • Labels:
      None
    • Bug Category:
      Correctness - Recoverable Corruption / Loss
    • Severity:
      Low
    • Complexity:
      Low Hanging Fruit
    • Discovered By:
      Code Inspection
    • Platform:
      All
    • Impacts:
      None
    • Since Version:
      4.0
    • Test and Documentation Plan:
      Hide

      N/A

      Show
      N/A

      Description

      4.0 has a minor bug in AlterTableStatement, in which we compare value compatibility of dropped type with new type instead of the other way around (and order is significant here).
      This results in more conversions identified as valid than should be allowed to.

      The fix is a trivial one-liner.

      Relatedly, we should audit all implementations of isValueCompatible() out there - at least one, BytesType - is no longer valid in 3.0+, since BytesType can no longer correctly read any complex column. And perhaps go even further, and restrict column recreation to only previously dropped type precisely, for which I have a couple arguments as well.

      That said, I'd like to defer those to a different ticket.

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              aleksey Aleksey Yeschenko Assign to me
              Reporter:
              aleksey Aleksey Yeschenko
              Authors:
              Aleksey Yeschenko
              Reviewers:
              Sam Tunnicliffe

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment