diff --git a/src/compute/src/memory_management/memory_manager.rs b/src/compute/src/memory_management/memory_manager.rs index 044dceef35b91..97d6be1c38dcd 100644 --- a/src/compute/src/memory_management/memory_manager.rs +++ b/src/compute/src/memory_management/memory_manager.rs @@ -92,11 +92,20 @@ impl GlobalMemoryManager { ) { use std::time::Duration; + use risingwave_common::util::epoch::Epoch; + use crate::memory_management::policy::MemoryControlStats; let mut tick_interval = tokio::time::interval(Duration::from_millis(self.barrier_interval_ms as u64)); - let mut memory_control_stats = MemoryControlStats::default(); + let mut memory_control_stats = MemoryControlStats { + batch_memory_usage: 0, + streaming_memory_usage: 0, + jemalloc_allocated_mib: 0, + lru_watermark_step: 0, + lru_watermark_time_ms: Epoch::physical_now(), + lru_physical_now_ms: Epoch::physical_now(), + }; loop { // Wait for a while to check if need eviction. diff --git a/src/compute/src/memory_management/policy.rs b/src/compute/src/memory_management/policy.rs index 0c51597a1cdd4..7f1a4013a4086 100644 --- a/src/compute/src/memory_management/policy.rs +++ b/src/compute/src/memory_management/policy.rs @@ -24,7 +24,6 @@ use risingwave_stream::task::LocalStreamManager; /// `MemoryControlStats` contains the necessary information for memory control, including both batch /// and streaming. -#[derive(Default)] pub struct MemoryControlStats { pub batch_memory_usage: usize, pub streaming_memory_usage: usize,