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

sql: ensure graceful rollbacks if the ADD REGION async job fails #60762

Merged
merged 1 commit into from
Feb 19, 2021

Commits on Feb 19, 2021

  1. sql: ensure graceful for rollbacks if the ADD REGION async job fails

    Previously, we assumed that the async component of an
    `ALTER DATABASE ... ADD REGION` wouldn't fail. This isn't really true
    though, because users may cancel jobs or we may be dropping regions in
    the same txn that fails validation.
    
    We have validation that ensures every region (READ ONLY or PUBLIC) on
    the multi-region type descriptor is also present on the database
    descriptor's region config (and vice-versa). If we realize that a region
    can't be promoted from READ ONLY to PUBLIC, we must also remove it from
    the database descriptor's region config (in addition removing it from
    the type descriptor). Prior to this patch we didn't do so, and cleanup
    could potentially fail validation. This patch fixes that behavior. This
    is a temporary band-aid until we stop denormalizing region values and
    have a single source of truth.
    
    Release note: None
    arulajmani committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    e654937 View commit details
    Browse the repository at this point in the history