diff --git a/Cargo.lock b/Cargo.lock index a7d7854d41cde..247dde691177e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5744,9 +5744,9 @@ dependencies = [ [[package]] name = "lru" version = "0.7.6" -source = "git+https://github.com/risingwavelabs/lru-rs.git?rev=cb2d7c7#cb2d7c7149a7f320c5aa73c15a6ec9f46ed5513f" +source = "git+https://github.com/risingwavelabs/lru-rs.git?rev=95f347b#95f347b5ca3c947335a51adf40fa86178ef4d60d" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.14.0", ] [[package]] @@ -13703,7 +13703,6 @@ dependencies = [ "futures-util", "generic-array", "governor", - "hashbrown 0.12.3", "hashbrown 0.13.2", "hashbrown 0.14.0", "hmac", diff --git a/Cargo.toml b/Cargo.toml index 0bc9cab78b4e4..df5372c519371 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -144,6 +144,7 @@ arrow-schema-deltalake = { package = "arrow-schema", version = "48.0.1" } deltalake = { git = "https://github.com/risingwavelabs/delta-rs", rev = "5c2dccd4640490202ffe98adbd13b09cef8e007b", features = [ "s3-no-concurrent-write", ] } +lru = { git = "https://github.com/risingwavelabs/lru-rs.git", rev = "95f347b" } parquet = "50" thiserror-ext = "0.0.11" tikv-jemalloc-ctl = { git = "https://github.com/risingwavelabs/jemallocator.git", rev = "64a2d9" } @@ -151,6 +152,7 @@ tikv-jemallocator = { git = "https://github.com/risingwavelabs/jemallocator.git" "profiling", "stats", ], rev = "64a2d9" } +tokio-util = "0.7" risingwave_backup = { path = "./src/storage/backup" } risingwave_batch = { path = "./src/batch" } @@ -190,7 +192,6 @@ risingwave_variables = { path = "./src/utils/variables" } risingwave_java_binding = { path = "./src/java_binding" } risingwave_jni_core = { path = "src/jni_core" } rw_futures_util = { path = "src/utils/futures_util" } -tokio-util = "0.7" [workspace.lints.rust] # `forbid` will also prevent the misuse of `#[allow(unused)]` diff --git a/src/common/Cargo.toml b/src/common/Cargo.toml index f6741129d2428..78de81f426bfe 100644 --- a/src/common/Cargo.toml +++ b/src/common/Cargo.toml @@ -56,7 +56,7 @@ hytra = { workspace = true } itertools = "0.12" itoa = "1.0" jsonbb = "0.1.2" -lru = { git = "https://github.com/risingwavelabs/lru-rs.git", rev = "cb2d7c7" } +lru = { workspace = true } memcomparable = { version = "0.2", features = ["decimal"] } num-integer = "0.1" num-traits = "0.2" diff --git a/src/common/src/estimate_size/collections/lru.rs b/src/common/src/estimate_size/collections/lru.rs index 523ca390837c3..0e7ec7b3862b2 100644 --- a/src/common/src/estimate_size/collections/lru.rs +++ b/src/common/src/estimate_size/collections/lru.rs @@ -16,7 +16,7 @@ use std::alloc::{Allocator, Global}; use std::borrow::Borrow; use std::hash::{BuildHasher, Hash}; -use lru::{DefaultHasher, KeyRef, LruCache}; +use lru::{DefaultHasher, LruCache}; use super::{AtomicMutGuard, MutGuard}; use crate::estimate_size::{EstimateSize, KvSize}; @@ -66,7 +66,7 @@ impl(&mut self, k: &Q) -> Option<&V> where - KeyRef: Borrow, + K: Borrow, Q: Hash + Eq + ?Sized, { self.inner.get(k) @@ -100,7 +100,7 @@ impl(&self, k: &Q) -> bool where - KeyRef: Borrow, + K: Borrow, Q: Hash + Eq + ?Sized, { self.inner.contains(k) diff --git a/src/stream/Cargo.toml b/src/stream/Cargo.toml index 7cce4531be55f..3c95212b6ae3f 100644 --- a/src/stream/Cargo.toml +++ b/src/stream/Cargo.toml @@ -37,7 +37,7 @@ governor = { version = "0.6", default-features = false, features = [ hytra = "0.1.2" itertools = "0.12" local_stats_alloc = { path = "../utils/local_stats_alloc" } -lru = { git = "https://github.com/risingwavelabs/lru-rs.git", rev = "cb2d7c7" } +lru = { workspace = true } maplit = "1.0.2" memcomparable = "0.2" multimap = "0.10" diff --git a/src/stream/src/cache/managed_lru.rs b/src/stream/src/cache/managed_lru.rs index 0bfb8415957c9..d91eb664d43a2 100644 --- a/src/stream/src/cache/managed_lru.rs +++ b/src/stream/src/cache/managed_lru.rs @@ -20,7 +20,7 @@ use std::ops::{Deref, DerefMut}; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; -use lru::{DefaultHasher, KeyRef, LruCache}; +use lru::{DefaultHasher, LruCache}; use risingwave_common::estimate_size::EstimateSize; use risingwave_common::metrics::LabelGuardedIntGauge; use risingwave_common::util::epoch::Epoch; @@ -150,7 +150,7 @@ impl(&mut self, k: &Q) -> Option<&V> where - KeyRef: Borrow, + K: Borrow, Q: Hash + Eq + ?Sized, { self.inner.get(k) @@ -181,7 +181,7 @@ impl(&self, k: &Q) -> bool where - KeyRef: Borrow, + K: Borrow, Q: Hash + Eq + ?Sized, { self.inner.contains(k) diff --git a/src/tests/simulation/Cargo.toml b/src/tests/simulation/Cargo.toml index 7783cfbcf0aba..6ce0c7ed05232 100644 --- a/src/tests/simulation/Cargo.toml +++ b/src/tests/simulation/Cargo.toml @@ -23,7 +23,7 @@ fail = { version = "0.5" } futures = { version = "0.3", default-features = false, features = ["alloc"] } glob = "0.3" itertools = "0.12" -lru = { git = "https://github.com/risingwavelabs/lru-rs.git", rev = "cb2d7c7" } +lru = { workspace = true } madsim = "0.2.22" paste = "1" pin-project = "1.1" diff --git a/src/workspace-hack/Cargo.toml b/src/workspace-hack/Cargo.toml index 743e290899f12..532e2573c527f 100644 --- a/src/workspace-hack/Cargo.toml +++ b/src/workspace-hack/Cargo.toml @@ -61,7 +61,6 @@ generic-array = { version = "0.14", default-features = false, features = ["more_ governor = { version = "0.6", default-features = false, features = ["dashmap", "jitter", "std"] } hashbrown-582f2526e08bb6a0 = { package = "hashbrown", version = "0.14", features = ["nightly", "raw"] } hashbrown-594e8ee84c453af0 = { package = "hashbrown", version = "0.13", features = ["raw"] } -hashbrown-5ef9efb8ec2df382 = { package = "hashbrown", version = "0.12", features = ["nightly", "raw"] } hmac = { version = "0.12", default-features = false, features = ["reset"] } hyper = { version = "0.14", features = ["full"] } indexmap-dff4ba8e3ae991db = { package = "indexmap", version = "1", default-features = false, features = ["serde"] }