Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#22184] YSQL: Fix DDL Atomicity drop table
Summary: The the fix for #22095 (c8c2616/D34431) has caused the drop table DDL to return to the user as soon as the table is marked as DELETING. Prior to the change we used to wait till the table reached the state DELETED. This causes a bunch of test failures when atomic DDL is enabled. The fix removed the DdlTransactionState early causing the early exit from drop table DDL. The primary issue is from `CatalogManager::ShouldDeleteTable`. This function returns false when the table has any tasks. DDL atomicity runs the `TableSchemaVerificationTask` which causes this function to return false, causing the table to be lazily deleted in the async background task. The check is only meant to wait for DeleteReplica RPCs to complete, so a better fix is to change this check to be more specific and keep the original cleanup logic. Jira: DB-11111 Test Plan: Jenkins Verified by merging with #D30471 Reviewers: myang Reviewed By: myang Subscribers: ybase Differential Revision: https://phorge.dev.yugabyte.com/D34601
- Loading branch information