Skip to content

Commit fc06beb

Browse files
internal stream hot tier size set to 10MiB in constant
1 parent b365f98 commit fc06beb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/hottier.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ use tokio_stream::wrappers::ReadDirStream;
5252
pub const STREAM_HOT_TIER_FILENAME: &str = ".hot_tier.json";
5353
pub const MIN_STREAM_HOT_TIER_SIZE_BYTES: u64 = 10737418240; // 10 GiB
5454
const HOT_TIER_SYNC_DURATION: Interval = clokwerk::Interval::Minutes(1);
55+
pub const INTERNAL_STREAM_HOT_TIER_SIZE_BYTES: u64 = 10485760; //10 MiB
5556

5657
#[derive(Debug, serde::Deserialize, serde::Serialize)]
5758
pub struct StreamHotTier {
@@ -692,9 +693,9 @@ impl HotTierManager {
692693
&& !self.check_stream_hot_tier_exists(INTERNAL_STREAM_NAME)
693694
{
694695
let mut stream_hot_tier = StreamHotTier {
695-
size: "10485760".to_string(),
696+
size: INTERNAL_STREAM_HOT_TIER_SIZE_BYTES.to_string(),
696697
used_size: Some("0".to_string()),
697-
available_size: Some("10485760".to_string()),
698+
available_size: Some(INTERNAL_STREAM_HOT_TIER_SIZE_BYTES.to_string()),
698699
oldest_date_time_entry: None,
699700
};
700701
self.put_hot_tier(INTERNAL_STREAM_NAME, &mut stream_hot_tier)

0 commit comments

Comments
 (0)