You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by yo...@apache.org on 2025/08/26 14:21:48 UTC
(iotdb) 01/01: Fix NPE in Procedure's log (#16255)
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch cp-ddddbae8ffa0
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 12821c0e0e39b6596a2cc22f57a58cfd0dd370bf
Author: Yongzao <yo...@apache.org>
AuthorDate: Tue Aug 26 09:57:42 2025 +0800
Fix NPE in Procedure's log (#16255)
---
.../org/apache/iotdb/confignode/procedure/ProcedureExecutor.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java
index 781dcdd030e..0d8368583b4 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java
@@ -803,17 +803,18 @@ public class ProcedureExecutor<Env> {
// Check if any of the worker is stuck
int runningCount = 0, stuckCount = 0;
for (WorkerThread worker : workerThreads) {
- if (worker.activeProcedure.get() == null) {
+ final Procedure<?> proc = worker.activeProcedure.get();
+ if (proc == null) {
continue;
}
runningCount++;
// WARN the worker is stuck
- if (worker.getCurrentRunTime() < DEFAULT_WORKER_STUCK_THRESHOLD) {
+ if (worker.getCurrentRunTime() > DEFAULT_WORKER_STUCK_THRESHOLD) {
stuckCount++;
LOG.warn(
"Worker stuck {}({}), run time {} ms",
worker,
- worker.activeProcedure.get().getProcType(),
+ proc.getProcType(),
worker.getCurrentRunTime());
}
LOG.info(