From 78e39a8b517561a9054a5d422b74a46df5c85ca4 Mon Sep 17 00:00:00 2001 From: Croxx Date: Tue, 3 Dec 2024 15:34:16 +0800 Subject: [PATCH] chore(dep): switch foyer to v0.13.0 release version (#19648) Signed-off-by: MrCroxx --- Cargo.lock | 85 ++++++++++++++++++++++------------- Cargo.toml | 13 +----- src/storage/src/store_impl.rs | 4 +- 3 files changed, 59 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a1a8fe74f858..c88659fc84df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5073,6 +5073,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -5099,8 +5105,9 @@ dependencies = [ [[package]] name = "foyer" -version = "0.13.0-dev" -source = "git+https://github.com/mrcroxx/foyer?rev=19bc2def14dfa8bb7d6581fb625584694bc7f4a0#19bc2def14dfa8bb7d6581fb625584694bc7f4a0" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21c47fb079b7e98dbe64ba1e25573a37bda50755470654a05407281180e9e32c" dependencies = [ "ahash 0.8.11", "anyhow", @@ -5117,15 +5124,16 @@ dependencies = [ [[package]] name = "foyer-common" -version = "0.13.0-dev" -source = "git+https://github.com/mrcroxx/foyer?rev=19bc2def14dfa8bb7d6581fb625584694bc7f4a0#19bc2def14dfa8bb7d6581fb625584694bc7f4a0" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e3a47ce88e9ebcf215324ac362e01af2ce6cfa5cc77954ca96d1ef696c764ea" dependencies = [ "ahash 0.8.11", "bytes", "cfg-if", "fastrace", "futures", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "itertools 0.13.0", "madsim-tokio", "parking_lot 0.12.1", @@ -5134,10 +5142,20 @@ dependencies = [ "serde", ] +[[package]] +name = "foyer-intrusive-collections" +version = "0.10.0-dev" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4fee46bea69e0596130e3210e65d3424e0ac1e6df3bde6636304bdf1ca4a3b" +dependencies = [ + "memoffset", +] + [[package]] name = "foyer-memory" -version = "0.13.0-dev" -source = "git+https://github.com/mrcroxx/foyer?rev=19bc2def14dfa8bb7d6581fb625584694bc7f4a0#19bc2def14dfa8bb7d6581fb625584694bc7f4a0" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1627a2a766a7171a6dea6ea13c4b62663dec750404a2a4d0d5d065a6b537dc2d" dependencies = [ "ahash 0.8.11", "bitflags 2.6.0", @@ -5145,9 +5163,9 @@ dependencies = [ "equivalent", "fastrace", "foyer-common", + "foyer-intrusive-collections", "futures", - "hashbrown 0.14.5", - "intrusive-collections", + "hashbrown 0.15.0", "itertools 0.13.0", "madsim-tokio", "parking_lot 0.12.1", @@ -5160,8 +5178,9 @@ dependencies = [ [[package]] name = "foyer-storage" -version = "0.13.0-dev" -source = "git+https://github.com/mrcroxx/foyer?rev=19bc2def14dfa8bb7d6581fb625584694bc7f4a0#19bc2def14dfa8bb7d6581fb625584694bc7f4a0" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dfacf446e6314c69155eff41d678b79eee21b7e8ad62615047bd5180dbd205" dependencies = [ "ahash 0.8.11", "allocator-api2", @@ -5181,7 +5200,7 @@ dependencies = [ "foyer-memory", "fs4", "futures", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "itertools 0.13.0", "libc", "lz4", @@ -5194,7 +5213,7 @@ dependencies = [ "serde", "thiserror 2.0.3", "tracing", - "twox-hash", + "twox-hash 2.0.1", "zstd 0.13.0", ] @@ -5288,9 +5307,9 @@ dependencies = [ [[package]] name = "fs4" -version = "0.9.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c6b3bd49c37d2aa3f3f2220233b29a7cd23f79d1fe70e5337d25fb390793de" +checksum = "c29c30684418547d476f0b48e84f4821639119c483b1eccd566c8cd0cd05f521" dependencies = [ "rustix 0.38.37", "windows-sys 0.52.0", @@ -5891,6 +5910,11 @@ name = "hashbrown" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] [[package]] name = "hashlink" @@ -6575,14 +6599,6 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -[[package]] -name = "intrusive-collections" -version = "0.9.7" -source = "git+https://github.com/foyer-rs/intrusive-rs?rev=94cfac4701dbc0033b7bc27e31c46bf3a12d96d7#94cfac4701dbc0033b7bc27e31c46bf3a12d96d7" -dependencies = [ - "memoffset", -] - [[package]] name = "io-extras" version = "0.18.1" @@ -7258,7 +7274,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ea9b256699eda7b0387ffbc776dd625e28bde3918446381781245b7a50349d8" dependencies = [ - "twox-hash", + "twox-hash 1.6.3", ] [[package]] @@ -7775,7 +7791,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-util", - "twox-hash", + "twox-hash 1.6.3", "url", ] @@ -8736,7 +8752,7 @@ dependencies = [ "snap", "thrift", "tokio", - "twox-hash", + "twox-hash 1.6.3", "zstd 0.13.0", "zstd-sys", ] @@ -8771,7 +8787,7 @@ dependencies = [ "snap", "thrift", "tokio", - "twox-hash", + "twox-hash 1.6.3", "zstd 0.13.0", "zstd-sys", ] @@ -10455,7 +10471,7 @@ dependencies = [ "serde", "serde_json", "thiserror 1.0.63", - "twox-hash", + "twox-hash 1.6.3", ] [[package]] @@ -10512,7 +10528,7 @@ dependencies = [ "tokio-stream 0.1.15", "tokio-util", "tracing", - "twox-hash", + "twox-hash 1.6.3", "uuid", "workspace-hack", ] @@ -10723,7 +10739,7 @@ dependencies = [ "tracing-futures", "tracing-opentelemetry", "tracing-subscriber", - "twox-hash", + "twox-hash 1.6.3", "url", "uuid", "workspace-hack", @@ -15130,6 +15146,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "twox-hash" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6db6856664807f43c17fbaf2718e2381ac1476a449aa104f5f64622defa1245" +dependencies = [ + "rand", +] + [[package]] name = "typed-builder" version = "0.10.0" diff --git a/Cargo.toml b/Cargo.toml index b4c7d57a6385..4faded6c164b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,12 +80,7 @@ license = "Apache-2.0" repository = "https://github.com/risingwavelabs/risingwave" [workspace.dependencies] -# foyer = { version = "0.12.2", features = ["tracing", "nightly"] } -foyer = { git = "https://github.com/mrcroxx/foyer", rev = "19bc2def14dfa8bb7d6581fb625584694bc7f4a0", features = [ - "tracing", - "nightly", - "prometheus", -] } +foyer = { version = "0.13.0", features = ["tracing", "nightly", "prometheus"] } apache-avro = { git = "https://github.com/risingwavelabs/avro", rev = "25113ba88234a9ae23296e981d8302c290fdaa4b", features = [ "snappy", "zstandard", @@ -160,11 +155,7 @@ arrow-udf-flight = "0.4" clap = { version = "4", features = ["cargo", "derive", "env"] } # Use a forked version which removes the dependencies on dynamo db to reduce # compile time and binary size. -deltalake = { version = "0.20.1", features = [ - "s3", - "gcs", - "datafusion", -] } +deltalake = { version = "0.20.1", features = ["s3", "gcs", "datafusion"] } itertools = "0.13.0" jsonbb = "0.1.4" lru = { git = "https://github.com/risingwavelabs/lru-rs.git", rev = "2682b85" } diff --git a/src/storage/src/store_impl.rs b/src/storage/src/store_impl.rs index 397c9065261b..4785b8bb7643 100644 --- a/src/storage/src/store_impl.rs +++ b/src/storage/src/store_impl.rs @@ -17,9 +17,9 @@ use std::sync::{Arc, LazyLock}; use std::time::Duration; use enum_as_inner::EnumAsInner; +use foyer::prometheus::PrometheusMetricsRegistry; use foyer::{ - DirectFsDeviceOptions, Engine, HybridCacheBuilder, LargeEngineOptions, - PrometheusMetricsRegistry, RateLimitPicker, + DirectFsDeviceOptions, Engine, HybridCacheBuilder, LargeEngineOptions, RateLimitPicker, }; use risingwave_common::monitor::GLOBAL_METRICS_REGISTRY; use risingwave_common_service::RpcNotificationClient;