diff --git a/Cargo.lock b/Cargo.lock index 14b37d0f25f6..17d40f4b5d46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4950,6 +4950,7 @@ checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", + "nanorand", "spin 0.9.8", ] @@ -4985,9 +4986,9 @@ dependencies = [ [[package]] name = "foyer" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9becaef8b57eaf4b229b04d3298b689f93e6e47af8b64a4626c26284698c57cf" +checksum = "2de727a58f28ad9c5ff9952979d2392851b5917785ca657e07277890109cd3a0" dependencies = [ "ahash 0.8.11", "anyhow", @@ -5003,9 +5004,9 @@ dependencies = [ [[package]] name = "foyer-common" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f9cf220e4a7377ce73058d9a94daa0e3bf5d73381d10271c4ff78ba7854949" +checksum = "be6577040f1b773e4a606180638ec48f5528d3d843d73092c06b5a8876bc4576" dependencies = [ "bytes", "cfg-if", @@ -5023,9 +5024,9 @@ dependencies = [ [[package]] name = "foyer-intrusive" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc9a7709b14917fc900fa0a255d7f58987d5f085edef61c5560e97d268450c6" +checksum = "01dbfd6763227809019a1dc01c98b6a78949c63d3a204d0a6f8e0325f077ab5c" dependencies = [ "foyer-common", "itertools 0.13.0", @@ -5033,9 +5034,9 @@ dependencies = [ [[package]] name = "foyer-memory" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e380013e4a5df7019a3c334732789f0affd0eae8fb75fd5d483b1cc76fe1cb4" +checksum = "02c59933e075daa88363e228475ce4fa9098689b9e13a26442666a3a3142da8d" dependencies = [ "ahash 0.8.11", "bitflags 2.6.0", @@ -5055,21 +5056,23 @@ dependencies = [ [[package]] name = "foyer-storage" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aa77365ba93fea4de7b3fcd510c52ccdcd4ff7b402dde0a0fa0822437b13b01" +checksum = "6976958440e7fee57bd25f6c04df0759484c18a233f00740f6c2c5a47b939d90" dependencies = [ "ahash 0.8.11", "allocator-api2", "anyhow", "array-util", "async-channel 2.2.1", + "auto_enums", "bincode 1.3.3", "bitflags 2.6.0", "bytes", "clap", "either", "fastrace", + "flume", "foyer-common", "foyer-memory", "fs4", @@ -7641,6 +7644,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "034a0ad7deebf0c2abcf2435950a6666c3c15ea9d8fad0c0f48efa8a7f843fed" +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom", +] + [[package]] name = "native-tls" version = "0.2.11" diff --git a/Cargo.toml b/Cargo.toml index 765c59b81140..9e871501e3e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,7 @@ license = "Apache-2.0" repository = "https://github.com/risingwavelabs/risingwave" [workspace.dependencies] -foyer = { version = "0.11.3", features = ["mtrace", "nightly"] } +foyer = { version = "0.11.5", features = ["mtrace", "nightly"] } apache-avro = { git = "https://github.com/risingwavelabs/avro", rev = "25113ba88234a9ae23296e981d8302c290fdaa4b", features = [ "snappy", "zstandard", diff --git a/src/storage/src/store_impl.rs b/src/storage/src/store_impl.rs index 05b7dc705ce2..c995dc5ac5f6 100644 --- a/src/storage/src/store_impl.rs +++ b/src/storage/src/store_impl.rs @@ -655,7 +655,7 @@ impl StateStoreImpl { .with_indexer_shards(opts.meta_file_cache_indexer_shards) .with_flushers(opts.meta_file_cache_flushers) .with_reclaimers(opts.meta_file_cache_reclaimers) - .with_buffer_threshold(opts.meta_file_cache_flush_buffer_threshold_mb * MB) // 128 MiB + .with_buffer_pool_size(opts.meta_file_cache_flush_buffer_threshold_mb * MB) // 128 MiB .with_clean_region_threshold( opts.meta_file_cache_reclaimers + opts.meta_file_cache_reclaimers / 2, ) @@ -700,7 +700,7 @@ impl StateStoreImpl { .with_indexer_shards(opts.data_file_cache_indexer_shards) .with_flushers(opts.data_file_cache_flushers) .with_reclaimers(opts.data_file_cache_reclaimers) - .with_buffer_threshold(opts.data_file_cache_flush_buffer_threshold_mb * MB) // 128 MiB + .with_buffer_pool_size(opts.data_file_cache_flush_buffer_threshold_mb * MB) // 128 MiB .with_clean_region_threshold( opts.data_file_cache_reclaimers + opts.data_file_cache_reclaimers / 2, )