This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 397bdb171fb Fix NPE when concurrently dropping database and deleting 
wal (#12378)
397bdb171fb is described below

commit 397bdb171fb5cc83470007de0c61f2a672bcafbb
Author: Alan Choo <[email protected]>
AuthorDate: Fri Apr 19 21:02:13 2024 +0800

    Fix NPE when concurrently dropping database and deleting wal (#12378)
---
 .../org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java
index c89f2d8cb9c..758081d012e 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java
@@ -461,6 +461,9 @@ public class WALNode implements IWALNode {
         logger.error("Fail to get data region processor for {}", oldestTsFile, 
e);
         return false;
       }
+      if (dataRegion == null) {
+        return false;
+      }
 
       // snapshot or flush memTable, flush memTable when it belongs to an old 
time partition, or
       // it's snapshot count or size reach threshold.

Reply via email to