pub enum GrepIndexLifecycle {
Disabled,
Backfilling {
target_seq: ChangeSeq,
cursor_inode_id: Option<InodeId>,
checkpoint_id: CheckpointId,
},
Steady {
built_through_seq: ChangeSeq,
next_event_index: u32,
},
}Expand description
Where a namespace’s grep index is in its lifecycle.
The phases carry different facts and never share a field: a backfill
reports the sequence it is walking toward and how far the walk got, and
only a steady index reports a watermark it has actually built through.
A reader that wants “is this searchable, and through what?” asks the
steady phase and nothing else.
Variants§
Disabled
No index is maintained for this namespace.
Backfilling
The initial walk over a pinned checkpoint is running. Nothing is searchable yet.
Fields
target_seq: ChangeSeqNamespace sequence the pinned checkpoint captured. Reaching it is what completes the backfill.
cursor_inode_id: Option<InodeId>Inode the walk resumes strictly after. Absent before the first page.
checkpoint_id: CheckpointIdCheckpoint pinning the state being walked.
Steady
The index follows the change feed. Commits at or below the watermark are searchable.
Implementations§
Source§impl GrepIndexLifecycle
impl GrepIndexLifecycle
Sourcepub fn is_built_through(&self, target_seq: ChangeSeq) -> bool
pub fn is_built_through(&self, target_seq: ChangeSeq) -> bool
Whether every commit at or below target_seq is represented.
A watermark inside a commit (next_event_index above zero) has that
commit only partly indexed, so it counts as reached only for earlier
sequences.
Trait Implementations§
Source§impl Clone for GrepIndexLifecycle
impl Clone for GrepIndexLifecycle
Source§fn clone(&self) -> GrepIndexLifecycle
fn clone(&self) -> GrepIndexLifecycle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more