Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rs/config/src/execution_environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const GIB: u64 = 1024 * MIB;
const TIB: u64 = 1024 * GIB;

// TODO(DSM-105): remove after the feature is enabled by default.
pub const LOG_MEMORY_STORE_FEATURE_ENABLED: bool = false;
pub const LOG_MEMORY_STORE_FEATURE_ENABLED: bool = true; // TODO: DO NOT SUBMIT! Remove debug code.
pub const LOG_MEMORY_STORE_FEATURE: FlagStatus = if LOG_MEMORY_STORE_FEATURE_ENABLED {
FlagStatus::Enabled
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ pub struct LogMemoryStore {
#[validate_eq(CompareWithValidateEq)]
maybe_page_map: Option<PageMap>,

// TODO: DO NOT SUBMIT! Remove debug code.
#[allow(dead_code)]
persistent_next_idx: u64,

/// Caches the ring buffer header to avoid expensive reads from the `PageMap`.
#[validate_eq(Ignore)]
header_cache: OnceLock<Option<Header>>,
Expand Down Expand Up @@ -68,6 +72,7 @@ impl LogMemoryStore {
} else {
None
},
persistent_next_idx: 0, // TODO: remove debug code.
header_cache: OnceLock::new(),
delta_log_sizes: VecDeque::new(),
}
Expand Down Expand Up @@ -291,6 +296,7 @@ impl Clone for LogMemoryStore {
// PageMap is a persistent data structure, so clone is cheap and creates
// an independent snapshot.
maybe_page_map: self.maybe_page_map.clone(),
persistent_next_idx: self.persistent_next_idx,
delta_log_sizes: self.delta_log_sizes.clone(),
// OnceLock is not Clone, so we must manually clone the state.
header_cache: match self.header_cache.get() {
Expand All @@ -306,6 +312,7 @@ impl PartialEq for LogMemoryStore {
// header_cache is a transient cache and should not be compared.
self.feature_flag == other.feature_flag
&& self.maybe_page_map == other.maybe_page_map
&& self.persistent_next_idx == other.persistent_next_idx
&& self.delta_log_sizes == other.delta_log_sizes
}
}
Expand Down
Loading