Repository navigation
Retry Pipe sinks after transient resource failures #19379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jt2594838
merged 3 commits into
apache:master
from
Caideyipi:fix/pipe-sink-resource-retry
Nov 25, 2026
+449
−2
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...e-rpc/src/main/java/org/apache/iotdb/rpc/AutoResizingBufferMemoryAllocationException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| package org.apache.iotdb.rpc; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| public final class AutoResizingBufferMemoryAllocationException extends IOException { | ||
|
|
||
| public AutoResizingBufferMemoryAllocationException(final String message) { | ||
| super(message); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
major
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java:110— Resource-failure short-circuit skips handshake for connection-reset PipeConnectionExceptionThe new block at line 110 runs before the
throwable instanceof PipeConnectionExceptionbranch. A PipeConnectionException wrapping TTransportException("Connection reset"/"Broken pipe") is now classified as NETWORK_TIMEOUT, so onPipeConnectionException()/handshakeOutputPipeSink() is never called and the broken client is never re-established; the subtask only resubmits itself and keeps failing on the same dead connection. The new test testConnectionResetRetriesLocallyWhenConnectionRetryIsDisabled…[truncated]
Fix: Evaluate the PipeConnectionException branch (handshake/reconnect) before the resource-failure short-circuit, or exclude PipeConnectionException from the new block so reconnect still happens; update the test to assert handshake is attempted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the report. Fixed in
470f3958e8d9c31b951dd012d8ba264c9880088f:onFailurenow attempts thePipeConnectionExceptionhandshake/reconnect before applying the transient resource-failure retry path.The regression test now verifies that
handshake()is attempted when local connection retry is disabled.Validation passed:
mvn spotless:apply -P with-integration-testsandmvn clean test -P with-integration-tests -pl iotdb-core/datanode -am -Dtest=PipeSinkSubtaskTest -Dsurefire.failIfNoSpecifiedTests=false(14 tests, 0 failures).