Skip to content

[Fix] Pause ConfigNode Pipe events polled after stop - #18913

Open
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:fix/pipe-confignode-stop-poll-race
Open

Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:fix/pipe-confignode-stop-poll-race

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

When STOP PIPE finishes while a ConfigNode task is blocked in source.supply(), the task can still transfer events created afterward. This causes IoTDBPipeLifeCycleIT.testLifeCycleWithHistoryDisabled to see root.ln0 on the receiver while the Pipe is stopped.

Check the stop flag before polling and again after the source returns. Keep a fetched event in lastEvent so restarting the Pipe transfers and commits it once. If the task was dropped during polling, release the fetched event without committing it.

Add deterministic regression tests for a stopped task, stopping during a blocked poll followed by restart, and dropping during a blocked poll.

Validation

  • The two stop regression tests fail against the original implementation.
  • PipeConfigNodeSubtaskTest and PipeConfigNodeSubtaskExecutorTest: 8 tests passed.
  • IoTDBPipeLifeCycleIT#testLifeCycleWithHistoryDisabled: passed with two ScalableSingleNodeMode clusters using the rebuilt ConfigNode jar. The initial local attempt exhausted Windows committed memory during node startup; the rerun passed with bounded JVM heaps.
  • ConfigNode main and test sources compile in both English and Chinese locales.
  • Spotless and git diff --check passed.

@Caideyipi Caideyipi mentioned this pull request Oct 19, 2026
Treat the default IoTConsensus V1 WAL watermark as unconfirmed replication in both retention and the staged-directory cleaner. Keep immediate release for V2 and protocols without a V1 WAL. Cover commit payload readability, terminal task recovery, and cleanup before the first watermark.
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