Skip to content

[Test] Fix deletion regression test flush control - #18888

Merged
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix-deletion-test-flush-control
Oct 15, 2026
Merged

jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix-deletion-test-flush-control

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

The deletion regression tests set managedByFlushManager before calling asyncClose(), so its guard returns before queuing the working memtable. This breaks both deletion WAL tests and causes a null-future exception during cleanup of the flush-completion test.

Claim manual flush control in the flush-time callback, after the close guard and before FlushManager registration. This lets the tests exercise the production close path while retaining control over flush execution and checking deletion persistence.

Validation

  • Previous validation of this fix: TsFileProcessorTest — 26 tests passed.
  • mvn spotless:apply -pl iotdb-core/datanode — passed.
  • git diff --check origin/master...HEAD — passed.

This PR has:

  • been self-reviewed.
  • added comments explaining the intent of the flush-control callback.
  • modified existing unit tests to exercise the close path and verify deletion WAL records and persisted modifications.

Key changed classes
  • TsFileProcessorTest

@hongzhi-gao hongzhi-gao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the close/flush callback sequence and the assertions in the affected deletion regression tests. No blocking code-review findings. My local targeted run did not reach tests because of stale cross-module build artifacts; DataNode unit-test CI is still pending, so please wait for it before merging.

@jt2594838
jt2594838 merged commit a7b88b1 into apache:master Oct 15, 2026
38 of 39 checks passed
@jt2594838
jt2594838 deleted the fix-deletion-test-flush-control branch October 15, 2026 09:09
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.

3 participants