File tree Expand file tree Collapse file tree
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,9 +127,16 @@ public void run() {
127127 if (PipeDataNodeAgent .task ().getPipeCount () != 0 ) {
128128 for (Map .Entry <String , PipeDataNodeRemainingEventAndTimeOperator > entry :
129129 PipeDataNodeSinglePipeMetrics .getInstance ().remainingEventAndTimeOperatorMap .entrySet ()) {
130- while (entry .getValue ().getRemainingNonHeartbeatEvents () > 0 ) {
130+ boolean timeout = false ;
131+ while (true ) {
132+ if (entry .getValue ().getRemainingNonHeartbeatEvents () > 0 ) {
133+ logger .info (
134+ "Successfully waited for pipe {} to finish." , entry .getValue ().getPipeName ());
135+ break ;
136+ }
131137 if (System .currentTimeMillis () - startTime
132138 > PipeConfig .getInstance ().getPipeMaxWaitFinishTime ()) {
139+ timeout = true ;
133140 break ;
134141 }
135142 try {
@@ -139,6 +146,10 @@ public void run() {
139146 logger .info ("Interrupted when waiting for pipe to finish" );
140147 }
141148 }
149+ if (timeout ) {
150+ logger .info ("Timed out when waiting for pipes to finish, will break" );
151+ break ;
152+ }
142153 }
143154 }
144155 // Persist progress index before shutdown to accurate recovery after restart
You can’t perform that action at this time.
0 commit comments