Skip to content

query-engine: remove the unused sealed-epoch machinery from SimpleMapStore #870

Open

Description

@milindsrivastava1997

Follow-up to #869 (review comment on global.rs).

Since #869, CircularBuffer no longer seals epochs: every window stays in the current MutableEpoch, whose distinct-window set is exact, and the oldest windows beyond the limit are evicted. No other policy seals either, so the sealed-epoch machinery is dead code in both stores:

  • the sealed_epochs: BTreeMap<EpochID, SealedEpoch> field and its read paths in per_key.rs and global.rs (range, exact and batch-exact queries, diagnostics, ReadBased cleanup);
  • SealedEpoch, MutableEpoch::seal and SealedEpoch::unique_windows in common.rs, the last two currently #[allow(dead_code)];
  • resolve_exact_windows's sealed_epochs argument.

Remove them so each store holds one epoch per aggregation and retention is "the N newest distinct windows" by construction. Behavior shouldn't change, since the sealed maps are always empty, but compare range-query latency before and after: sealed epochs were sorted Vecs, kept for scan speed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions