File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
datanode/src/main/java/org/apache/iotdb/db/pipe/sink
protocol/thrift/async/handler
node-commons/src/main/java/org/apache/iotdb/commons/client Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2222import org .apache .iotdb .common .rpc .thrift .TEndPoint ;
2323import org .apache .iotdb .commons .client .ClientPoolFactory ;
2424import org .apache .iotdb .commons .client .IClientManager ;
25+ import org .apache .iotdb .commons .client .ThriftClient ;
2526import org .apache .iotdb .commons .client .async .AsyncPipeDataTransferServiceClient ;
2627import org .apache .iotdb .commons .concurrent .IoTDBThreadPoolFactory ;
2728import org .apache .iotdb .commons .concurrent .ThreadName ;
@@ -259,6 +260,7 @@ public void onComplete(final TPipeTransferResp response) {
259260
260261 @ Override
261262 public void onError (final Exception e ) {
263+ ThriftClient .resolveException (e , client );
262264 PipeLogger .log (
263265 LOGGER ::warn ,
264266 e ,
Original file line number Diff line number Diff line change 1919
2020package org .apache .iotdb .db .pipe .sink .protocol .thrift .async .handler ;
2121
22+ import org .apache .iotdb .commons .client .ThriftClient ;
2223import org .apache .iotdb .commons .client .async .AsyncPipeDataTransferServiceClient ;
2324import org .apache .iotdb .db .pipe .sink .protocol .thrift .async .IoTDBDataRegionAsyncSink ;
2425import org .apache .iotdb .service .rpc .thrift .TPipeTransferReq ;
@@ -61,6 +62,10 @@ public void onComplete(final TPipeTransferResp response) {
6162
6263 @ Override
6364 public void onError (final Exception exception ) {
65+ if (client != null ) {
66+ ThriftClient .resolveException (exception , client );
67+ }
68+
6469 if (connector .isClosed ()) {
6570 clearEventsReferenceCount ();
6671 connector .eliminateHandler (this , true );
Original file line number Diff line number Diff line change 2929import java .lang .reflect .InvocationTargetException ;
3030import java .net .ConnectException ;
3131import java .net .SocketException ;
32+ import java .nio .channels .ClosedChannelException ;
3233import java .util .Optional ;
3334
3435/**
@@ -113,7 +114,8 @@ static boolean isConnectionBroken(Throwable cause) {
113114 || (cause instanceof IOException
114115 && (hasExpectedMessage (cause , "Connection reset by peer" )
115116 || hasExpectedMessage (cause , "Broken pipe" )))
116- || (cause instanceof ConnectException && hasExpectedMessage (cause , "Connection refused" ));
117+ || (cause instanceof ConnectException && hasExpectedMessage (cause , "Connection refused" )
118+ || (cause instanceof ClosedChannelException ));
117119 }
118120
119121 static boolean hasExpectedMessage (Throwable cause , String expectedMessage ) {
You can’t perform that action at this time.
0 commit comments