Skip to content

[To dev/1.3] Fix tree deletion recovery during WAL replay (#19081) - #19089

Merged
jt2594838 merged 6 commits into
dev/1.3from
codex/cp-76d573a4-dev-1.3
Nov 3, 2026
Merged

jt2594838 merged 6 commits into
dev/1.3from
codex/cp-76d573a4-dev-1.3

Conversation

@Caideyipi

@Caideyipi Caideyipi commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Backport the tree-model WAL deletion recovery fix from #19081, source commit 76d573a4e3d83068d4eb4bbb1e4ed97040463eb8, onto dev/1.3 at eda8986d15926bf7669e7b51de73405ec65bf7ea.

Replay the original deletion against the recovered memtable. Persist file mods only for matching devices and cap each mod at that device's flushed end time, preserving measurement scope and wildcard matching so later WAL rewrites remain visible after restart.

Compatibility adaptations

  • Use the 1.3 Deletion and TsFileResource.getModFile() APIs, retain file offsets, and match device paths with the target tree-path APIs.
  • Use PlainDeviceID and explicit chunk-reader cleanup for TsFile 1.x test compatibility.
  • Put the source tree restart scenario in the discoverable IoTDBDeletionRecoveryIT with the LocalStandaloneIT category because the target branch's IoTDBRestartIT is ignored.

Only the requested tree-model portion is included. The source table-model changes have no corresponding implementation on dev/1.3.

Validation

Local validation with JDK 17 and Maven 3.8.8:

  • Spotless formatting passed for the affected modules.
  • TsFilePlanRedoerTest: 10 tests passed, 0 failures/errors/skips.
  • IoTDBDeletionRecoveryIT with with-integration-tests,SimpleIT: 1 test passed, 0 failures/errors/skips. The test covers deletion, a later rewrite, forced DataNode restart, and a subsequent flush.

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@jt2594838
jt2594838 merged commit c0811e5 into dev/1.3 Nov 3, 2026
17 of 18 checks passed
@jt2594838
jt2594838 deleted the codex/cp-76d573a4-dev-1.3 branch November 3, 2026 10:29
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.

2 participants