Skip to content

Commit e8ca7c8

Browse files
committed
chore: fix
1 parent c0c5991 commit e8ca7c8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

rust/cubestore/cubestore/src/cachestore/cache_eviction_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pub struct CacheEvictionManager {
150150
eviction_below_threshold: u8,
151151
/// Proactive deletion of keys with upcoming expiration in the next N seconds. + It checks size, because
152152
/// it can be useless to delete keys with small size, because it can lead to a drop of refresh keys or touch flags
153-
eviction_proactive_size_threshold: usize,
153+
eviction_proactive_size_threshold: u32,
154154
eviction_proactive_ttl_threshold: u32,
155155
compaction_trigger_size: u64,
156156
// background listener to track events

rust/cubestore/cubestore/src/config/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ pub trait ConfigObj: DIService {
464464

465465
fn cachestore_cache_persist_batch_size(&self) -> usize;
466466

467-
fn cachestore_cache_eviction_proactive_size_threshold(&self) -> usize;
467+
fn cachestore_cache_eviction_proactive_size_threshold(&self) -> u32;
468468

469469
fn cachestore_cache_eviction_proactive_ttl_threshold(&self) -> u32;
470470

@@ -611,7 +611,7 @@ pub struct ConfigObjImpl {
611611
pub cachestore_cache_eviction_batch_size: usize,
612612
pub cachestore_cache_eviction_below_threshold: u8,
613613
pub cachestore_cache_persist_batch_size: usize,
614-
pub cachestore_cache_eviction_proactive_size_threshold: usize,
614+
pub cachestore_cache_eviction_proactive_size_threshold: u32,
615615
pub cachestore_cache_eviction_proactive_ttl_threshold: u32,
616616
pub cachestore_cache_ttl_notify_channel: usize,
617617
pub cachestore_cache_ttl_buffer_max_size: usize,
@@ -1031,7 +1031,7 @@ impl ConfigObj for ConfigObjImpl {
10311031
self.cachestore_cache_eviction_below_threshold
10321032
}
10331033

1034-
fn cachestore_cache_eviction_proactive_size_threshold(&self) -> usize {
1034+
fn cachestore_cache_eviction_proactive_size_threshold(&self) -> u32 {
10351035
self.cachestore_cache_eviction_proactive_size_threshold
10361036
}
10371037
}
@@ -1432,7 +1432,7 @@ impl Config {
14321432
"CUBESTORE_CACHE_EVICTION_PROACTIVE_SIZE_THRESHOLD",
14331433
// 256 kb
14341434
256 << 10,
1435-
Some(cachestore_cache_max_entry_size),
1435+
Some(cachestore_cache_max_entry_size as u32),
14361436
// It's not allowed to be less than 128 kb, because it can proactively evict refresh keys
14371437
Some(128 << 10),
14381438
),

0 commit comments

Comments
 (0)