Skip to content

[server] Fix race condition in table/partition deletion ordering - #4041

Open
zhang-arvin wants to merge 1 commit into
apache:mainfrom
zhang-arvin:fix/1026-table-deletion-ordering
Open

[server] Fix race condition in table/partition deletion ordering#4041
zhang-arvin wants to merge 1 commit into
apache:mainfrom
zhang-arvin:fix/1026-table-deletion-ordering

Conversation

@zhang-arvin

Copy link
Copy Markdown

Summary

  • Swap the submission order so that metadata deletion (ZK) is submitted to the ioExecutor before remote directory cleanup
  • Since the ioExecutor is a single-threaded pool, slow remote filesystem operations can block the faster metadata deletion, causing flaky test timeouts in CoordinatorEventProcessorTest.testCreateAndDropTable

Fixes #1026

Brief change log

  • Swapped the call order in completeDeleteTable() so asyncDeleteTableMetadata() is submitted before asyncDeleteRemoteDirectory()
  • Applied the same reordering in completeDeletePartition() for consistency

Test Plan

  • Existing CoordinatorEventProcessorTest.testCreateAndDropTable
  • The fix addresses the race condition at the root cause level

Swap the submission order so that metadata deletion (ZK) is submitted
to the ioExecutor before remote directory cleanup. Since the ioExecutor
is a single-threaded pool, slow remote filesystem operations can block
the faster metadata deletion, causing flaky test timeouts in
CoordinatorEventProcessorTest.testCreateAndDropTable.

This closes apache#1026.
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.

Test CoordinatorEventProcessorTest.testCreateAndDropTable is not stable

1 participant