File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -803,17 +803,18 @@ private int calculateRunningAndStuckWorkers() {
803803 // Check if any of the worker is stuck
804804 int runningCount = 0 , stuckCount = 0 ;
805805 for (WorkerThread worker : workerThreads ) {
806- if (worker .activeProcedure .get () == null ) {
806+ final Procedure <?> proc = worker .activeProcedure .get ();
807+ if (proc == null ) {
807808 continue ;
808809 }
809810 runningCount ++;
810811 // WARN the worker is stuck
811- if (worker .getCurrentRunTime () < DEFAULT_WORKER_STUCK_THRESHOLD ) {
812+ if (worker .getCurrentRunTime () > DEFAULT_WORKER_STUCK_THRESHOLD ) {
812813 stuckCount ++;
813814 LOG .warn (
814815 "Worker stuck {}({}), run time {} ms" ,
815816 worker ,
816- worker . activeProcedure . get () .getProcType (),
817+ proc .getProcType (),
817818 worker .getCurrentRunTime ());
818819 }
819820 LOG .info (
You can’t perform that action at this time.
0 commit comments