Skip to content

Fix SinkChannel failure propagation test race - #18675

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/sink-channel-failure-propagation-test-race
Open

Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/sink-channel-failure-propagation-test-race

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Fix a race in SinkChannelFailurePropagationTest.testSingleChannelFailurePropagation.

ShuffleSinkHandle.abort() aborts its downstream channel before marking the handle itself as aborted. The test previously waited for the child SinkChannel to become aborted and then immediately asserted the parent ShuffleSinkHandle state, so the assertion could run inside that brief asynchronous gap.

Wait for the parent handle state directly. Also give each asynchronous propagation phase its own timeout window instead of sharing one timestamp across the entire test.

Testing

  • mvn spotless:check -pl iotdb-core/datanode "-Ddevelocity.off=true"
  • mvn checkstyle:check -pl iotdb-core/datanode "-Ddevelocity.off=true"
  • The targeted unit test was attempted locally, but the DataNode test compilation was blocked before test execution by stale generated sources and locally installed dependencies.

This PR has:

  • been self-reviewed.
  • modified an existing unit test to cover the asynchronous state transition.

Key changed/added classes (or packages if there are too many classes) in this PR
  • SinkChannelFailurePropagationTest

@Voyagerroc-Lab Voyagerroc-Lab left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed with assistance from OpenAI Codex. Starting each bounded wait at the point its condition becomes relevant prevents earlier retry time from consuming the later state-propagation windows. The test now waits on the public sink handle abort state while retaining the channel lifecycle assertions.

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