Skip to content

Commit

Permalink
Merge branch 'chore/switch-e2e-sql-backend' into zp/deprecate-etcd
Browse files Browse the repository at this point in the history
  • Loading branch information
yezizp2012 committed Oct 14, 2024
2 parents e2fa139 + b49356b commit 53bf8e6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
8 changes: 6 additions & 2 deletions src/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@ pub struct StorageConfig {
#[serde(default)]
pub prefetch_buffer_capacity_mb: Option<usize>,

#[serde(default)]
pub max_cached_recent_versions_number: Option<usize>,
#[serde(default = "default::storage::max_cached_recent_versions_number")]
pub max_cached_recent_versions_number: usize,

/// max prefetch block number
#[serde(default = "default::storage::max_prefetch_block_number")]
Expand Down Expand Up @@ -1553,6 +1553,10 @@ pub mod default {
cfg!(debug_assertions)
}

pub fn max_cached_recent_versions_number() -> usize {
60
}

pub fn block_cache_capacity_mb() -> usize {
512
}
Expand Down
1 change: 1 addition & 0 deletions src/config/ci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ stream_exchange_concurrent_barriers = 10

[storage]
imm_merge_threshold = 2
max_cached_recent_versions_number = 200

[storage.object_store.retry]
streaming_upload_attempt_timeout_ms = 10000
Expand Down
2 changes: 1 addition & 1 deletion src/config/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ This page is automatically generated by `./risedev generate-example-config`
| enable_fast_compaction | | true |
| high_priority_ratio_in_percent | DEPRECATED: This config will be deprecated in the future version, use `storage.cache.block_cache_eviction.high_priority_ratio_in_percent` with `storage.cache.block_cache_eviction.algorithm = "Lru"` instead. | |
| imm_merge_threshold | The threshold for the number of immutable memtables to merge to a new imm. | 0 |
| max_cached_recent_versions_number | | |
| max_cached_recent_versions_number | | 60 |
| max_concurrent_compaction_task_number | | 16 |
| max_prefetch_block_number | max prefetch block number | 16 |
| max_preload_io_retry_times | | 3 |
Expand Down
1 change: 1 addition & 0 deletions src/config/example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ shared_buffer_flush_ratio = 0.800000011920929
shared_buffer_min_batch_flush_size_mb = 800
imm_merge_threshold = 0
write_conflict_detection_enabled = true
max_cached_recent_versions_number = 60
max_prefetch_block_number = 16
disable_remote_compactor = false
share_buffer_upload_concurrency = 8
Expand Down
5 changes: 1 addition & 4 deletions src/storage/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,7 @@ impl From<(&RwConfig, &SystemParamsReader, &StorageMemoryConfig)> for StorageOpt
meta_cache_shard_num: s.meta_cache_shard_num,
meta_cache_eviction_config: s.meta_cache_eviction_config.clone(),
prefetch_buffer_capacity_mb: s.prefetch_buffer_capacity_mb,
max_cached_recent_versions_number: c
.storage
.max_cached_recent_versions_number
.unwrap_or(60),
max_cached_recent_versions_number: c.storage.max_cached_recent_versions_number,
max_prefetch_block_number: c.storage.max_prefetch_block_number,
disable_remote_compactor: c.storage.disable_remote_compactor,
share_buffer_upload_concurrency: c.storage.share_buffer_upload_concurrency,
Expand Down

0 comments on commit 53bf8e6

Please sign in to comment.