Skip to content

Show pre-deleted table schemas and improve write errors - #18626

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/table-pre-delete-visibility
Open

Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/table-pre-delete-visibility

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Tables and columns can remain in PRE_DELETE while a DROP operation is incomplete. Plain SHOW TABLES and DESC currently hide these objects, and attempts to write to or recreate them can report that they are missing or already exist.

  • Include PRE_DELETE tables in SHOW TABLES without DETAILS, while continuing to hide PRE_CREATE tables. Keep pre-deleted columns in plain DESC and retain the existing presentation of pending type changes.
  • Report that a table or column is being deleted, with guidance to wait or retry the DROP. Use SEMANTIC_ERROR so IF NOT EXISTS and automatic schema creation cannot suppress these failures as ordinary duplicates. Provide both English and Chinese messages.
  • Check pre-deleted columns on the missing-column write path, once per request, including INSERT and TsFile loading with automatic schema creation disabled. Existing-column writes do not perform an additional RPC.
  • Exclude pre-deleted columns from DataNode cache initialization, refresh, and column-extension schemas so these paths cannot restore their writability. DESC continues to use the complete metadata.

Validation

  • 32 targeted unit tests passed across TablePreDeleteTest, TableHeaderSchemaValidatorTest, CreateTableProcedureTest, ConfigMTreeTest, and DataNodeTableCacheTest.
  • Spotless and Checkstyle passed for the changed modules; English/Chinese message keys and placeholders match.
  • Full-reactor English and Chinese test-compile -DskipTests passed for the affected reactor (Node Commons, DataNode, ConfigNode, and dependencies).

This PR has:

  • been self-reviewed.
  • added unit tests for the changed behavior and cache refresh/recovery paths.

No integration cluster was started for this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant