Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-23.1: sql/schemachanger: address bugs with column families #100030

Merged
merged 3 commits into from Mar 30, 2023

Commits on Mar 28, 2023

  1. sql/schemachangr: dropping column families ran into errors

    Previously, dropping column families was not implemented,
    when we eliminated oprules, we replaced the ops with
    NotImplementedForDrop, which wasn't sufficient for
    dropped columns. The column families are cleaned up
    when the column type itself is dropped, so we don't
    really need to do much here. To address this, this
    patch will add code to only assert that either the
    table is being dropped or the column family has been
    removed earlier.
    
    Fixes: #99796
    Release note: None
    fqazi committed Mar 28, 2023
    Copy the full SHA
    65de860 View commit details
    Browse the repository at this point in the history
  2. sql: avoid writing to column families that do not exist in the primar…

    …y index
    
    Previously, if a new column family was added during an add
    column and an update/insert occurred concurrently, we could
    end up writing to this new column family in any primary index.
    This was inadequate because if the primary index did not store
    the column, then runtime will have trouble reading data from this
    table, since after a rollback the added column / column family
    will get cleaned up from the table descriptor. To address this,
    this patch avoids writing any columns not stored within an index
    descriptor.
    
    Fixes: #99950
    
    Release note (bug fix): Concurrent DML while adding
    a new column with a new column family can lead to
    corruption in the existing primary index. If a rollback
    occurs the table may no longer be accessible.
    fqazi committed Mar 28, 2023
    Copy the full SHA
    192299b View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. sql/schemachanger: add DML injection tests for rollback scenarios

    Previously, our DML injection tests only covered happy paths
    for schema changes. We recently ran into a bug where the old
    primary index was corrupted after DML and left in a bad state
    visible only after a rollback. To address this, this patch
    adds tests for this specific scenario and adds the ability
    to test rollbacks with DML injection.
    
    Epic: none
    
    Release note: None
    fqazi committed Mar 29, 2023
    Copy the full SHA
    632fa5a View commit details
    Browse the repository at this point in the history