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 moreimpl Copy for ShardLayout
Source§impl Debug for ShardLayout
impl Debug for ShardLayout
Source§impl Default for ShardLayout
impl Default for ShardLayout
Source§fn default() -> ShardLayout
fn default() -> ShardLayout
The floor — what an empty database is laid out with.
impl Eq for ShardLayout
Source§impl PartialEq for ShardLayout
impl PartialEq for ShardLayout
impl StructuralPartialEq for ShardLayout
Auto Trait Implementations§
impl Freeze for ShardLayout
impl RefUnwindSafe for ShardLayout
impl Send for ShardLayout
impl Sync for ShardLayout
impl Unpin for ShardLayout
impl UnsafeUnpin for ShardLayout
impl UnwindSafe for ShardLayout
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.