HTHou commented on code in PR #12856:
URL: https://github.com/apache/iotdb/pull/12856#discussion_r1669587667


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java:
##########
@@ -2169,6 +2161,12 @@ private List<WALFlushListener> logDeletionInWAL(
         walFlushListeners.add(walFlushListener);
       }
     }
+    // Some time the deletion operation doesn't have any related tsfile 
processor or memtable,
+    // but it's still necessary to write to the WAL, so that iotconsensus can 
synchronize the delete
+    // operation to other nodes.
+    if (walFlushListeners.isEmpty()) {
+      
walFlushListeners.add(getWALNode().log(TsFileProcessor.MEMTABLE_NOT_EXIST, 
deleteDataNode));
+    }

Review Comment:
   If config.getDataRegionConsensusProtocolClass() != IOT_CONSENSUS, there will 
be an UnsupportedOperationException thrown from getWALNode() method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to