Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-461

Alter Table might re-use column IDs after drop/add column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • M4.5
    • None
    • master, tserver

    Description

      In further investigating various alter table bugs, I think I discovered another one: our Schema object doesn't maintain any "next_unused_column_id_" member or anything. So, if you issue an ALTER which drops a column, and then a separate ALTER which adds a new one, you may end up resuscitating old data. Even worse, it might be old data from an entirely unrelated column with a different type.

      There's a test which attempts to show this doesn't happen in tablet-schema-test, but it's too localized to Tablet and reuses a single SchemaBuilder which does properly avoid column id reuse. We need an integration test for this case.

      Attachments

        Issue Links

          Activity

            People

              tlipcon Todd Lipcon
              tlipcon Todd Lipcon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: