Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions data_plane/src/storage_engines/sketch_db/index/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,18 @@ impl SketchStore {
self.instances.read().unwrap().len()
}

/// Clone every registered `SketchInstanceMetadata` into a snapshot
/// vec. Used by read-side primitives that need to scan the whole
/// catalog without holding the registry lock across user code
/// (e.g. `query::timeline::timeline_for_metric`). O(N) clone +
/// O(N) memory; cheap at production catalog sizes.
pub fn snapshot_instances(&self) -> Vec<SketchInstanceMetadata> {
match self.instances.read() {
Ok(map) => map.values().cloned().collect(),
Err(_) => Vec::new(),
}
}

// ── Phase 5 M1: lifecycle-status surface ─────────────────────────
//
// Mirror the `SchemaRegistry` lifecycle methods so the ingest /
Expand Down
1 change: 1 addition & 0 deletions data_plane/src/storage_engines/sketch_db/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
pub mod decoders;
pub mod delta_apply;
pub mod sketch_reducer;
pub mod timeline;
pub mod timeline_dispatch;
pub mod window_merger;

Expand Down
Loading