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 07792b11254 Fix WAL resource leak when using IoT series consensus
#12796
07792b11254 is described below
commit 07792b11254406a54eb92d273d6de44e6644e8f2
Author: Peng Junzhi <[email protected]>
AuthorDate: Mon Jun 24 08:53:46 2024 -0500
Fix WAL resource leak when using IoT series consensus #12796
---
.../apache/iotdb/db/storageengine/dataregion/wal/WALManager.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java
index e38d641b944..f3911c9b196 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java
@@ -111,10 +111,10 @@ public class WALManager implements IService {
/** WAL node will be deleted only when using iot series consensus protocol.
*/
public void deleteWALNode(String applicantUniqueId) {
if (config.getWalMode() == WALMode.DISABLE
- ||
!config.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.IOT_CONSENSUS)
- || !config
- .getDataRegionConsensusProtocolClass()
- .equals(ConsensusFactory.IOT_CONSENSUS_V2)) {
+ ||
(!config.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.IOT_CONSENSUS)
+ && !config
+ .getDataRegionConsensusProtocolClass()
+ .equals(ConsensusFactory.IOT_CONSENSUS_V2))) {
return;
}