Skip to content

[Pipe] Preserve downstream sink error messages - #18553

Merged
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix/pipe-sink-downstream-error
Sep 2, 2026
Merged

[Pipe] Preserve downstream sink error messages#18553
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix/pipe-sink-downstream-error

Conversation

@Caideyipi

@Caideyipi Caideyipi commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Description

Problem

When a pipe sink receives a failure from the downstream node, the returned TSStatus may contain the real receiver error in nested subStatus entries. The sink previously exposed only a generic MULTIPLE_ERROR or pipe wrapper message, so SHOW PIPES.ExceptionMessage did not identify the actual cause.

Design

The status handler recursively inspects nested sub-statuses and prefers a concrete downstream receiver error over generic aggregate or pipe wrapper messages. The selected message is preserved in the prior status and included in asynchronous retry summary exceptions. When the root cause has no message, its exception type is retained.

Stored retry errors are cleared when retry queues are drained, pipe events are discarded, or the sink closes, preventing stale failures from appearing in later status reports.

Tests

  • PipeReceiverStatusHandlerTest: 14 tests, 0 failures
  • Spotless check for node-commons and datanode
  • git diff --check

This PR has:

  • been self-reviewed.
  • added comments explaining the why and intent of non-obvious code.
  • added unit tests or modified existing tests to cover new code paths.

Key changed/added classes (or packages if there are too many classes) in this PR
  • org.apache.iotdb.commons.pipe.receiver.PipeReceiverStatusHandler
  • org.apache.iotdb.db.pipe.connector.protocol.thrift.async.IoTDBDataRegionAsyncSink
  • Pipe receiver and async sink tests

@jt2594838
jt2594838 merged commit 18ec5f0 into apache:master Sep 2, 2026
71 of 73 checks passed
@jt2594838
jt2594838 deleted the fix/pipe-sink-downstream-error branch September 2, 2026 02:13
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