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-22.2: sql: mark index as GCed if table has been GCed in legacy gc path #100137

Merged

Commits on Mar 30, 2023

  1. sql: mark index as GCed if table has been GCed in legacy gc path

    Previously, if a table is GCed before an index is GCed by a TRUNCATE TABLE
    gc job, the TRUNCATE TABLE gc job can be stuck in running status because
    the table descriptor is missing. This is problematic because these jobs will
    never succeed and doing nothing. This commit marks the indexes as GCed if
    the descriptor cannot be found assuming that the table has been GCed. Also,
    table GC should have GCed all the indexes.
    
    Note that this only affect the legacy GC path.
    
    Epic: None
    
    Release note (bug fix): This commit fixes a bug where TRUNCATE TABLE gc
    job can be stuck in running status if the table descriptor has been GCed.
    It was because TRUNCATE TABLE actually creates new empty indexes, then
    replaces and drops the old indexes. The dropped indexes data are deleted
    and GCed within the TRUNCATE TABLE gc job which needed to see the table
    descriptor to make progress. But, if the table data has been GCed, the
    TRUNCATE TABLE gc job couldn't make progress. This patch makes it able
    to handle the missing descriptor edge case and let the TRUNCATE TABLE
    gc job succeed.
    chengxiong-ruan committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    29ac031 View commit details
    Browse the repository at this point in the history