Skip to content

Commit

Permalink
Rename config page_cache_deletion_buffer_queue_capacity to deletion_a…
Browse files Browse the repository at this point in the history
…head_log_buffer_queue_capacity (#14600)
  • Loading branch information
HTHou authored Dec 31, 2024
1 parent 88a5969 commit 88a99aa
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ public class IoTDBConfig {
/** max total direct buffer off heap memory size proportion */
private double maxDirectBufferOffHeapMemorySizeProportion = 0.8;

/** Blocking queue capacity of each page cache deletion buffer */
private int pageCacheDeletionBufferQueueCapacity = 500;
/** Blocking queue capacity of each delete ahead log buffer */
private int deletionAheadLogBufferQueueCapacity = 500;

/** Size threshold of each wal file. Unit: byte */
private volatile long walFileSizeThresholdInByte = 30 * 1024 * 1024L;
Expand Down Expand Up @@ -1991,12 +1991,12 @@ public void setMaxDirectBufferOffHeapMemorySizeProportion(
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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,14 @@ private void loadIoTConsensusV2Props(TrimProperties properties) throws IOExcepti
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) {
Expand Down Expand Up @@ -1231,15 +1239,6 @@ private void loadWALProps(TrimProperties properties) throws IOException {
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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
####################
Expand Down Expand Up @@ -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 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
####################
Expand Down

0 comments on commit 88a99aa

Please sign in to comment.