pub struct ShardLayout {
pub facts: usize,
pub entities: usize,
pub edges: usize,
pub temporal: usize,
pub postings: usize,
}Expand description
Shard counts for every arena group.
Public because it is observable: it appears in Stats and
in a MaintainReport, which is how a caller sees
that a database re-sharded itself and what it moved to.
Fields§
§facts: usizeFacts and their cold sidecar.
entities: usizeEntities, the by-name index and the per-entity fact lists.
edges: usizeBoth current edge mirrors and both history mirrors.
temporal: usizeThe recorded_at index.
postings: usizeBM25 term handles and document lengths, plus the tag lists.
Implementations§
Source§impl ShardLayout
impl ShardLayout
Sourcepub const GROWTH_MARGIN: usize = GROW_FACTOR
pub const GROWTH_MARGIN: usize = GROW_FACTOR
How far a database may drift below its ideal layout before a maintenance pass moves it.
Observable rather than internal: it is what tells a caller how much
under-sharding to expect between rebuilds, and it is the figure a test
needs to know how much data provokes one. Under-sharding is the cheap
direction — see ShardLayout::group_earns_rebuild — so this is wide
on purpose.
Sourcepub const SHRINK_MARGIN: usize = SHRINK_FACTOR
pub const SHRINK_MARGIN: usize = SHRINK_FACTOR
How far it may drift above before one shrinks it. Narrower, because over-sharding is the direction that costs memory.
Trait Implementations§
Source§impl Clone for ShardLayout
impl Clone for ShardLayout
Source§fn clone(&self) -> ShardLayout
fn clone(&self) -> ShardLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more