This is an automated email from the ASF dual-hosted git repository. haonan pushed a commit to branch remame_delete_log_queue_config in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit c6315dfdd06e7518ff9ea2726a94e9fa5074f8b4 Author: HTHou <[email protected]> AuthorDate: Tue Dec 31 12:05:17 2024 +0800 Rename config page_cache_deletion_buffer_queue_capacity to deletion_ahead_log_buffer_queue_capacity --- .../main/java/org/apache/iotdb/db/conf/IoTDBConfig.java | 10 +++++----- .../java/org/apache/iotdb/db/conf/IoTDBDescriptor.java | 17 ++++++++--------- .../deletion/persist/PageCacheDeletionBuffer.java | 2 +- .../resources/conf/iotdb-system.properties.template | 11 ++++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java index 3554610e20b..113670426c6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java @@ -226,7 +226,7 @@ public class IoTDBConfig { private double maxDirectBufferOffHeapMemorySizeProportion = 0.8; /** Blocking queue capacity of each page cache deletion buffer */ - private int pageCacheDeletionBufferQueueCapacity = 500; + private int deletionAheadLogBufferQueueCapacity = 500; /** Size threshold of each wal file. Unit: byte */ private volatile long walFileSizeThresholdInByte = 30 * 1024 * 1024L; @@ -1991,12 +1991,12 @@ public class IoTDBConfig { this.maxDirectBufferOffHeapMemorySizeProportion = maxDirectBufferOffHeapMemorySizeProportion; } - public int getPageCacheDeletionBufferQueueCapacity() { - return pageCacheDeletionBufferQueueCapacity; + public int getDeletionAheadLogBufferQueueCapacity() { + return deletionAheadLogBufferQueueCapacity; } - void setPageCacheDeletionBufferQueueCapacity(int pageCacheDeletionBufferQueueCapacity) { - this.pageCacheDeletionBufferQueueCapacity = pageCacheDeletionBufferQueueCapacity; + void setDeletionAheadLogBufferQueueCapacity(int deletionAheadLogBufferQueueCapacity) { + this.deletionAheadLogBufferQueueCapacity = deletionAheadLogBufferQueueCapacity; } public long getWalFileSizeThresholdInByte() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java index a42bce1fdb4..f1e160a16e1 100755 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java @@ -1198,6 +1198,14 @@ public class IoTDBDescriptor { properties.getProperty( "iot_consensus_v2_mode", ConfigurationFileUtils.getConfigurationDefaultValue("iot_consensus_v2_mode"))); + int deletionAheadLogBufferQueueCapacity = + Integer.parseInt( + properties.getProperty( + "deletion_ahead_log_buffer_queue_capacity", + Integer.toString(conf.getDeletionAheadLogBufferQueueCapacity()))); + if (deletionAheadLogBufferQueueCapacity > 0) { + conf.setDeletionAheadLogBufferQueueCapacity(deletionAheadLogBufferQueueCapacity); + } } private void loadAuthorCache(TrimProperties properties) { @@ -1231,15 +1239,6 @@ public class IoTDBDescriptor { conf.setWalBufferSize(walBufferSize); } - int pageCacheDeletionBufferQueueCapacity = - Integer.parseInt( - properties.getProperty( - "page_cache_deletion_buffer_queue_capacity", - Integer.toString(conf.getPageCacheDeletionBufferQueueCapacity()))); - if (pageCacheDeletionBufferQueueCapacity > 0) { - conf.setPageCacheDeletionBufferQueueCapacity(pageCacheDeletionBufferQueueCapacity); - } - boolean WALInsertNodeCacheShrinkClearEnabled = Boolean.parseBoolean( properties.getProperty( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/persist/PageCacheDeletionBuffer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/persist/PageCacheDeletionBuffer.java index 1e33793f3b8..289bcfc53fa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/persist/PageCacheDeletionBuffer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/persist/PageCacheDeletionBuffer.java @@ -61,7 +61,7 @@ public class PageCacheDeletionBuffer implements DeletionBuffer { // Buffer config keep consistent with WAL. private static final int ONE_THIRD_WAL_BUFFER_SIZE = config.getWalBufferSize() / 3; private static final double FSYNC_BUFFER_RATIO = 0.95; - private static final int QUEUE_CAPACITY = config.getPageCacheDeletionBufferQueueCapacity(); + private static final int QUEUE_CAPACITY = config.getDeletionAheadLogBufferQueueCapacity(); private static final long MAX_WAIT_CLOSE_TIME_IN_MS = 10000; // DeletionResources received from storage engine, which is waiting to be persisted. diff --git a/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template b/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template index d71f8742792..3811beb10dc 100644 --- a/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template +++ b/iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template @@ -1476,11 +1476,6 @@ iot_consensus_cache_window_time_in_ms=-1 # Datatype: boolean enable_wal_compression=true -# Blocking queue capacity of each PageCacheDeletionBuffer, restricts maximum number of entry in the blocking queue. -# effectiveMode: restart -# Datatype: int -page_cache_deletion_buffer_queue_capacity=500 - #################### ### IoTConsensus Configuration #################### @@ -1897,6 +1892,12 @@ iot_consensus_v2_pipeline_size=5 # Datatype: string iot_consensus_v2_mode=batch +# Blocking queue capacity of each deletion ahead log buffer queue for iot consensus v2, +# restricts maximum number of entry in the blocking queue. +# effectiveMode: restart +# Datatype: int +deletion_ahead_log_buffer_queue_capacity=500 + #################### ### Procedure Configuration ####################
