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

scplan: Fix deprules for dropping computed columns #120794

Merged
merged 1 commit into from
May 2, 2024

Commits on May 2, 2024

  1. scplan: Fix deprules for dropping computed columns

    This PR fixes the new schema changer deprules for
    dropping virtual computed columns which are also
    used for hash and expression indexes.
    Currently, the optimizer allows for virtual, computed
    columns to be evaluated even when under mutation.
    However, this causes concurrent DML issues when the
    schemachanger job is running as the column that the
    virtual computed column depends on moves into WRITE_ONLY
    stage prior to the computed column being dropped.
    As a result, the optimizer is unable to access the column
    for evaluating the compute expression.
    This PR updates the dep rules to ensure the virtual,
    computed column is dropped before the dependent column
    moves to WRITE_ONLY ensuring that the compute expression
    can be enforced correctly for concurrent DML during all
    stages of the schema change.
    
    Epic: none
    Fixes: cockroachdb#111608
    Fixes: cockroachdb#111619
    Release note: None
    rimadeodhar committed May 2, 2024
    Configuration menu
    Copy the full SHA
    47aa2d5 View commit details
    Browse the repository at this point in the history