pub enum MemoryClass {
PageCache,
DecodedCache,
QueryExecution,
ResultBuffering,
AiCandidates,
Compaction,
Replication,
Backup,
NetworkBuffers,
}Expand description
The memory pools of S1E-003: the budgets one node-level governor owns.
The variant set is exactly the spec’s, in spec order; index
matches that order and is the layout of
GovernorConfig::class_budgets.
Variants§
PageCache
Raw (on-disk form) page cache.
DecodedCache
Decoded (post-decompress/decrypt) page cache.
QueryExecution
Query execution operators (hash tables, sort runs in memory).
ResultBuffering
Result materialization and buffering.
AiCandidates
AI candidate sets (ANN/full-text retrieval buffers).
Compaction
Compaction and index maintenance.
Replication
Replication log shipping and follow-apply buffers. Reserved.
Backup
Backup/export buffers.
NetworkBuffers
Network receive/send buffers; carries the control-plane and replication protocols. Reserved.
Implementations§
Source§impl MemoryClass
impl MemoryClass
Sourcepub const COUNT: usize = 9
pub const COUNT: usize = 9
Number of classes (array layout of the governor’s counters/budgets).
Sourcepub const ALL: [MemoryClass; 9]
pub const ALL: [MemoryClass; 9]
Every class, in spec order (the index layout).
Sourcepub fn is_reserved(self) -> bool
pub fn is_reserved(self) -> bool
Classes whose memory must never be fully starved (S1E-003 step 5, §13.1 reserved control/replication capacity): the replication pool, and the network buffers that carry the control-plane and replication protocols. Only these may draw down the reserved floor.
Sourcepub fn is_low_priority(self) -> bool
pub fn is_low_priority(self) -> bool
Deferrable classes rejected first under pressure (S1E-003 step 1, §13.1 maintenance yields to foreground work).
Sourcepub fn is_reclaimable_cache(self) -> bool
pub fn is_reclaimable_cache(self) -> bool
Classes whose memory is reclaimable on demand (S1E-003 step 2): the caches can evict entries and hand bytes back.
Sourcepub fn is_spill_eligible(self) -> bool
pub fn is_spill_eligible(self) -> bool
Classes whose operator working memory the S1E-004 spill manager can move to disk under escalation step 3: query execution (hash tables, sort runs) and result materialization. The caches are reclaimed instead (step 2), AI candidate sets are recomputable, and the reserved pools are never spilled.
Trait Implementations§
Source§impl Clone for MemoryClass
impl Clone for MemoryClass
Source§fn clone(&self) -> MemoryClass
fn clone(&self) -> MemoryClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MemoryClass
Source§impl Debug for MemoryClass
impl Debug for MemoryClass
Source§impl<'de> Deserialize<'de> for MemoryClass
impl<'de> Deserialize<'de> for MemoryClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for MemoryClass
impl Display for MemoryClass
impl Eq for MemoryClass
Source§impl Hash for MemoryClass
impl Hash for MemoryClass
Source§impl Ord for MemoryClass
impl Ord for MemoryClass
Source§fn cmp(&self, other: &MemoryClass) -> Ordering
fn cmp(&self, other: &MemoryClass) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MemoryClass
impl PartialEq for MemoryClass
Source§impl PartialOrd for MemoryClass
impl PartialOrd for MemoryClass
Source§impl Serialize for MemoryClass
impl Serialize for MemoryClass
impl StructuralPartialEq for MemoryClass
Auto Trait Implementations§
impl Freeze for MemoryClass
impl RefUnwindSafe for MemoryClass
impl Send for MemoryClass
impl Sync for MemoryClass
impl Unpin for MemoryClass
impl UnsafeUnpin for MemoryClass
impl UnwindSafe for MemoryClass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more