pub enum GrepIndexLifecycle {
Disabled,
Backfilling {
target_seq: ChangeSeq,
cursor_inode_id: Option<InodeId>,
checkpoint_id: CheckpointId,
},
Active {
built_through_seq: ChangeSeq,
next_event_index: u32,
},
}Expand description
Where a namespace’s grep index is in its lifecycle.
Each status contains only the fields valid for that lifecycle state.
Backfilling reports its target and current position. Active reports
how far the index has been built. Clients should treat a namespace as
searchable only when the index is Active.
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.
Active
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