File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -486,8 +486,13 @@ public void restartAllStuckPipes() {
486486 releaseWriteLock ();
487487 }
488488
489- // Restart all stuck pipes
490- stuckPipes .parallelStream ().forEach (this ::restartStuckPipe );
489+ // Restart all stuck pipes.
490+ // Note that parallelStream cannot be used here. The method PipeTaskAgent#dropPipe also uses
491+ // parallelStream. If parallelStream is used here, the subtasks generated inside the dropPipe
492+ // may not be scheduled by the worker thread of ForkJoinPool because of less available threads,
493+ // and the parent task will wait for the completion of the subtasks in ForkJoinPool forever,
494+ // causing the deadlock.
495+ stuckPipes .forEach (this ::restartStuckPipe );
491496 }
492497
493498 private Set <PipeMeta > findAllStuckPipes () {
You can’t perform that action at this time.
0 commit comments