Skip to content

[Fix] Preserve IoTConsensusV2 replication for split LOAD TsFiles - #18927

Merged
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:codex/fix-iotv2-load-progress
Oct 20, 2026
Merged

jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:codex/fix-iotv2-load-progress

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Split LOAD transactions write to a region's write peer but retain progress generated by the coordinator. When those nodes differ, IoTConsensusV2 filters the imported TsFile out of replication because its progress contains no local node ID. Even with a local coordinator, progress allocated before PREPARE can fall behind intervening writes. Other replicas can therefore miss imported data, including after cluster restart.

Assign fresh receiving-node progress when COMMIT imports each staged TsFile, and serialize it into the resource file before publishing the import. Other consensus protocols retain the prepared progress. Regression tests check replication eligibility after resource recovery, ordering after an intervening write, and the non-V2 behavior.

Validation

  • The two V2 regression tests fail before the fix; the non-V2 control passes.
  • LoadTsFileManagerTest, LoadTsFileTableSchemaTest, and LoadTsFileResumeTest: 34 tests passed.
  • IoTDBPipeDataSinkIT#testSinkTsFileFormat10 and IoTDBPipeLifeCycleIT#testDoubleLiving: both passed with dual IoTConsensusV2 Batch clusters and again with dual Stream clusters (4 IT executions, including both cluster restarts).
  • The integration-test reactor package completed successfully.
  • Spotless, Checkstyle, and git diff --check passed.

@jt2594838
jt2594838 merged commit 35b9b70 into apache:master Oct 20, 2026
37 of 39 checks passed
@jt2594838
jt2594838 deleted the codex/fix-iotv2-load-progress branch October 20, 2026 06:57
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