Skip to content

Replace SimpleStore with inverted index (label -> BTreeMap<Time>)#175

Merged
milindsrivastava1997 merged 27 commits intomainfrom
130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups
Mar 27, 2026
Merged

Replace SimpleStore with inverted index (label -> BTreeMap<Time>)#175
milindsrivastava1997 merged 27 commits intomainfrom
130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups

Conversation

@zzylol
Copy link
Copy Markdown
Contributor

@zzylol zzylol commented Mar 9, 2026

Problem

SimpleMapStore used a time-primary layout that caused:

  • Range queries to scan all windows then sort/regroup results — O(N log N + k)
  • An exclusive write lock on every query, blocking concurrent reads
  • Deep clones (clone_boxed_core()) on every read

Solution

Three structural changes inspired by VictoriaMetrics' IndexDB:

  1. Label interning — each unique label combination gets a compact MetricID: u32. All internal maps key on u32 instead of the full label struct.
  2. Epoch partitioning — data is split into fixed-size epoch slots. Epoch rotation is O(1) (drop oldest); range queries skip non-overlapping epochs entirely.
  3. Columnar storage + lazy index — three parallel arrays (windows_col, metric_ids_col, aggregates_col) instead of row tuples. Range scans touch only windows_col; aggregate pointers are only chased on matches. The exact-lookup index (window_to_ids) is built lazily on first query after a write batch and cached — zero index maintenance on the insert hot path.

Complexity changes

Operation Before After
Insert O(1) O(1) amortized (lazy index + monotonic fast path)
Range query O(N log N + k) O(log N + k) (binary search on sealed epoch; linear scan on mutable)
Exact query O(k) deep copies O(m) Arc::clone()
Epoch cleanup O(N log N) O(1)
Query lock Exclusive write Shared read

Changes

  • common.rsInternTable, MutableEpoch (columnar + lazy index), SealedEpoch (sorted Vec)
  • per_key.rs — epoch rotation with with_capacity hint, batch metadata hoisting, write() lock for exact query
  • global.rs — same epoch/interning model; single Mutex<StoreData>; pre-grouped batch inserts
  • traits.rs / simple_engine.rs / conversion.rsArc buckets, remove clone_boxed_core() on read paths
  • Added benches/simple_store_bench.rs, Criterion wiring in Cargo.toml

Benchmark Results

Linux x86-64, release build, Criterion. Medians; lower is better.

Insert — insert/batch_size (Sum, NoCleanup)

Batch Legacy New Speedup
100 52.8 µs 30.5 µs 1.73x
1 000 560.1 µs 266.8 µs 2.10x
10 000 5.42 ms 2.67 ms 2.03x

Range query — query/range_store_size

Windows Accumulator Legacy New Speedup
500 Sum 111.7 µs 34.6 µs 3.23x
500 KLL 878.3 µs 33.9 µs 25.94x
10 000 Sum 2.52 ms 812 µs 3.10x
10 000 KLL 19.96 ms 737 µs 27.09x

KLL benefit is outsized because the columnar scan never touches aggregate pointers for non-matching windows, eliminating KLL deserialization for the ~95–99 % of entries that don't match a typical range.

Exact query — query/exact_store_size

~330 ns on both legacy and new across all store sizes — parity.

@zzylol zzylol linked an issue Mar 9, 2026 that may be closed by this pull request
@zzylol zzylol self-assigned this Mar 9, 2026
Copy link
Copy Markdown
Contributor

@milindsrivastava1997 milindsrivastava1997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Are there correctness tests to ensure that the new store functions same as the per_key store?
  • Why is the global store changed to have per key behavior?
  • I didn't see "before" benchmark numbers in the PR.

Copy link
Copy Markdown
Contributor

@milindsrivastava1997 milindsrivastava1997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on earlier comments

zzylol added a commit that referenced this pull request Mar 20, 2026
Adds six benchmark groups to measure the existing SimpleMapStore's
algorithm complexity before the inverted-index replacement in PR #175:
- insert/batch_size: O(B) insert scaling across 10–5000 items
- insert/num_agg_ids: lock overhead across 1–200 aggregation IDs
- query/range_store_size: O(W·log W + k) range query across 100–5000 windows
- query/exact_store_size: O(1) HashMap lookup verified across store sizes
- store_analyze/num_agg_ids: O(A) earliest-timestamp scan across 10–1000 IDs
- concurrent_reads/thread_count: write-lock serialisation with 1–8 threads

Both Global and PerKey lock strategies are profiled in each group.
Results land in target/criterion/ as HTML reports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zzylol
Copy link
Copy Markdown
Contributor Author

zzylol commented Mar 20, 2026

@milindsrivastava1997 Added a separate store benchmark first: #211

@zzylol zzylol mentioned this pull request Mar 20, 2026
2 tasks
zzylol added a commit that referenced this pull request Mar 20, 2026
…ry, and store analyze (#211)

* Add Criterion benchmarks for SimpleMapStore performance profiling

Adds six benchmark groups to measure the existing SimpleMapStore's
algorithm complexity before the inverted-index replacement in PR #175:
- insert/batch_size: O(B) insert scaling across 10–5000 items
- insert/num_agg_ids: lock overhead across 1–200 aggregation IDs
- query/range_store_size: O(W·log W + k) range query across 100–5000 windows
- query/exact_store_size: O(1) HashMap lookup verified across store sizes
- store_analyze/num_agg_ids: O(A) earliest-timestamp scan across 10–1000 IDs
- concurrent_reads/thread_count: write-lock serialisation with 1–8 threads

Both Global and PerKey lock strategies are profiled in each group.
Results land in target/criterion/ as HTML reports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix cargo fmt violations in bench and add dummy bench to Dockerfile

- Apply rustfmt to simple_store_bench.rs (alignment, closure brace style)
- Add dummy benches/simple_store_bench.rs stub to Dockerfile dep-cache layer
  so cargo can parse the [[bench]] manifest entry during docker build

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Expand benchmarks: larger ranges, KLL sketch accumulator

- Increase parameter ranges (batch: 100→50k, windows: 500→50k,
  agg IDs: 1→1k/5k, threads: 1→16)
- Add DatasketchesKLLAccumulator k=200 variant to insert and range
  query benchmarks to expose realistic sketch clone cost
- KLL results show ~10x overhead on range queries vs trivial SumAccumulator

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix asap-planner-rs Dockerfile: add dummy bench stub for simple_store_bench

Same fix as asap-query-engine/Dockerfile — the workspace Cargo.toml for
asap-query-engine declares [[bench]] simple_store_bench, so Cargo requires
the file to exist even during dependency-only builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@zzylol
Copy link
Copy Markdown
Contributor Author

zzylol commented Mar 20, 2026

added correctness tests to ensure that the new store functions same as the per_key store #212

@zzylol zzylol force-pushed the 130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups branch from 8a1cd59 to ed49375 Compare March 20, 2026 03:32
@zzylol zzylol changed the base branch from main to 211-store-correctness-contract-tests March 20, 2026 03:34
Base automatically changed from 211-store-correctness-contract-tests to main March 20, 2026 19:16
@zzylol
Copy link
Copy Markdown
Contributor Author

zzylol commented Mar 20, 2026

Why is the global store changed to have per key behavior?

Now I moved original global to legacy/global.rs, and the current global.rs is for the modified simple store.

@zzylol zzylol force-pushed the 130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups branch from 5e666d0 to 3b26f8d Compare March 20, 2026 19:49
@zzylol
Copy link
Copy Markdown
Contributor Author

zzylol commented Mar 20, 2026

@milindsrivastava1997 , passed the API correctness test of simple store.

Copy link
Copy Markdown
Contributor

@milindsrivastava1997 milindsrivastava1997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why renames aren't showing up. Maybe split this PR into (a) renames + corresponding changes to simple_store_bench, (b) other changes?

zzylol pushed a commit that referenced this pull request Mar 23, 2026
Move `SimpleMapStoreGlobal` → `LegacySimpleMapStoreGlobal` and
`SimpleMapStorePerKey` → `LegacySimpleMapStorePerKey` under a new
`simple_map_store/legacy/` submodule, in preparation for introducing
optimised replacements that will reclaim the original names (PR #175 part b).

- `legacy/global.rs` / `legacy/per_key.rs`: original implementations,
  renamed with the `Legacy` prefix throughout (struct, impl, log messages)
- `legacy/mod.rs`: re-exports both legacy types
- `simple_map_store/mod.rs`: references legacy module; `SimpleMapStore`
  enum now wraps `LegacySimpleMapStoreGlobal` / `LegacySimpleMapStorePerKey`
- `benches/simple_store_bench.rs`: doc comment updated to reflect that
  the bench profiles the legacy store implementation

Public API (`SimpleMapStore`, `Store`) is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
milindsrivastava1997 pushed a commit that referenced this pull request Mar 23, 2026
…220)

Move `SimpleMapStoreGlobal` → `LegacySimpleMapStoreGlobal` and
`SimpleMapStorePerKey` → `LegacySimpleMapStorePerKey` under a new
`simple_map_store/legacy/` submodule, in preparation for introducing
optimised replacements that will reclaim the original names (PR #175 part b).

- `legacy/global.rs` / `legacy/per_key.rs`: original implementations,
  renamed with the `Legacy` prefix throughout (struct, impl, log messages)
- `legacy/mod.rs`: re-exports both legacy types
- `simple_map_store/mod.rs`: references legacy module; `SimpleMapStore`
  enum now wraps `LegacySimpleMapStoreGlobal` / `LegacySimpleMapStorePerKey`
- `benches/simple_store_bench.rs`: doc comment updated to reflect that
  the bench profiles the legacy store implementation

Public API (`SimpleMapStore`, `Store`) is unchanged.

Co-authored-by: zz_y <zz_y@node0.zz-y-296227.softmeasure-pg0.wisc.cloudlab.us>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@zzylol zzylol force-pushed the 130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups branch from 1b14f94 to da0390a Compare March 24, 2026 00:17
@zzylol zzylol changed the base branch from main to simple_store_opt March 24, 2026 00:45
@zzylol zzylol force-pushed the 130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups branch from da0390a to 02d2147 Compare March 24, 2026 00:49
zzylol added a commit that referenced this pull request Mar 24, 2026
#221)

* Rename SimpleMapStore impls to Legacy* and move to legacy/ submodule (#220)

Move `SimpleMapStoreGlobal` → `LegacySimpleMapStoreGlobal` and
`SimpleMapStorePerKey` → `LegacySimpleMapStorePerKey` under a new
`simple_map_store/legacy/` submodule, in preparation for introducing
optimised replacements that will reclaim the original names (PR #175 part b).

- `legacy/global.rs` / `legacy/per_key.rs`: original implementations,
  renamed with the `Legacy` prefix throughout (struct, impl, log messages)
- `legacy/mod.rs`: re-exports both legacy types
- `simple_map_store/mod.rs`: references legacy module; `SimpleMapStore`
  enum now wraps `LegacySimpleMapStoreGlobal` / `LegacySimpleMapStorePerKey`
- `benches/simple_store_bench.rs`: doc comment updated to reflect that
  the bench profiles the legacy store implementation

Public API (`SimpleMapStore`, `Store`) is unchanged.

Co-authored-by: zz_y <zz_y@node0.zz-y-296227.softmeasure-pg0.wisc.cloudlab.us>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix cargo fmt formatting in simple_map_store/mod.rs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: zz_y <zz_y@node0.zz-y-296227.softmeasure-pg0.wisc.cloudlab.us>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Base automatically changed from simple_store_opt to main March 24, 2026 00:49
zzylol added a commit that referenced this pull request Mar 24, 2026
…220)

Move `SimpleMapStoreGlobal` → `LegacySimpleMapStoreGlobal` and
`SimpleMapStorePerKey` → `LegacySimpleMapStorePerKey` under a new
`simple_map_store/legacy/` submodule, in preparation for introducing
optimised replacements that will reclaim the original names (PR #175 part b).

- `legacy/global.rs` / `legacy/per_key.rs`: original implementations,
  renamed with the `Legacy` prefix throughout (struct, impl, log messages)
- `legacy/mod.rs`: re-exports both legacy types
- `simple_map_store/mod.rs`: references legacy module; `SimpleMapStore`
  enum now wraps `LegacySimpleMapStoreGlobal` / `LegacySimpleMapStorePerKey`
- `benches/simple_store_bench.rs`: doc comment updated to reflect that
  the bench profiles the legacy store implementation

Public API (`SimpleMapStore`, `Store`) is unchanged.

Co-authored-by: zz_y <zz_y@node0.zz-y-296227.softmeasure-pg0.wisc.cloudlab.us>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@zzylol zzylol force-pushed the 130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups branch from 02d2147 to 7032bfd Compare March 24, 2026 00:50
zzylol and others added 23 commits March 24, 2026 12:27
Defines a run_contract_suite() function that tests every observable
behaviour of a Store implementation:

  - Empty-store edge cases (range query, exact query, earliest timestamp)
  - Single insert: range query hit/miss, exact query hit/miss (wrong start,
    wrong end)
  - Batch insert: count correctness, chronological ordering guaranteed
  - Partial range filtering (windows outside query range excluded)
  - Aggregation-ID isolation (inserts into agg 1 not visible to agg 2)
  - Earliest-timestamp tracking: global minimum, per agg-ID
  - Cleanup — CircularBuffer: oldest window evicted, newest 8 retained
  - Cleanup — ReadBased: evicted after threshold reads, unread window kept
  - Concurrency: 8-thread concurrent inserts (no data loss),
    8-thread concurrent reads (each returns full result set)

Two test entry points exercise both existing implementations:
  contract_per_key  — LockStrategy::PerKey (reference)
  contract_global   — LockStrategy::Global

Adding a new Store implementation requires only a new #[test] function
that calls run_contract_suite() with the new factory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ltaSet exclusion

- Add SerializableToSink import so clone-fidelity tests compile on concrete types
- Clone fidelity tests for all 11 accumulator types: SumAccumulator,
  MinMaxAccumulator, DatasketchesKLLAccumulator, IncreaseAccumulator,
  MultipleSumAccumulator, MultipleMinMaxAccumulator, SetAggregatorAccumulator,
  DeltaSetAggregatorAccumulator, CountMinSketchAccumulator,
  CountMinSketchWithHeapAccumulator, HydraKllSketchAccumulator
- Three keyed-entry tests: grouping by key, coexistence of keyed/unkeyed, multiple keys per window
- DeltaSetAggregator cleanup exclusion test
- Concurrency tests: concurrent inserts (8 threads) and concurrent reads

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add separate time and space complexity tables with named variables (A,
L, N, k, m, V), per-operation breakdowns, and a note on Arc-sharing
eliminating deep copies on the read path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1. Label interning (MetricID: u32)
   Introduce InternTable in common.rs that assigns a compact u32 to each
   unique Option<KeyByLabelValues> on first insert. All internal maps
   (label_map, window_to_ids) use MetricID as key — O(1) hash/compare
   instead of O(label_bytes). Label strings stored once; resolved back to
   KeyByLabelValues only when building the returned TimestampedBucketsMap.

2. Time-epoch partitioning + O(1) rotation cleanup
   Replace the single BTreeMap-per-label with epoch-partitioned storage:
   BTreeMap<EpochID, EpochData>. epoch_capacity = num_aggregates_to_retain
   (set on first insert). When the current epoch reaches capacity, a new
   epoch is opened and the oldest is dropped — O(1) drop vs the previous
   O(k·m) BTreeSet walk + targeted BTreeMap removals. ReadBased cleanup
   scans read_counts then calls EpochData::remove_windows on each epoch.

3. Sorted Vec posting lists
   Replace HashSet<Option<KeyByLabelValues>> in window_to_labels with
   Vec<MetricID> maintained in sorted order via partition_point + insert.
   Cache-friendly iteration for exact queries; enables merge-intersection
   for future label-predicate pushdown.

Both per_key.rs and global.rs updated. Shared types extracted to common.rs.
Public Store trait interface and all 329 existing tests are unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add dummy benches/simple_map_store_benchmark.rs in Dockerfile dep-caching
  layer so cargo can parse the manifest (bench entry in Cargo.toml)
- Run cargo fmt to fix import ordering and line-wrapping in common.rs,
  global.rs, and per_key.rs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Save old time-primary SimpleMapStorePerKey as LegacySimpleMapStorePerKey
  (deprecated, kept only for benchmarking)
- Expose it as pub mod per_key_legacy in the store module
- Add old_vs_new/* benchmark group comparing legacy vs current on
  insert, range_query, exact_query, concurrent_reads, and scaling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cated

- Add MetricBucketMap type alias in common.rs to fix type_complexity
- Use MetricBucketMap in global.rs and per_key.rs
- Remove unused `mut` from `results` in global.rs
- Collapse nested `if` into single condition in per_key.rs
- Add #[allow(deprecated)] to impl blocks in per_key_legacy.rs
- Add #![allow(deprecated)] to benchmark file for legacy store usage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…chs, O(1) flat storage

1. Time-primary range scan (common.rs MutableEpoch):
   - window_to_ids: HashMap → BTreeMap, enabling O(log N + actual_matches) range scan
   - Range queries no longer visit every label; only labels with data in matched windows
   - For high-cardinality sparse data: O(L·log N) → O(log N + actual_matches)

2. Immutable sealed epochs (common.rs SealedEpoch):
   - On epoch rotation, MutableEpoch is sealed into a flat sorted Vec<(TimestampRange, MetricID, Arc<Agg>)>
   - Sorted by (TimestampRange, MetricID): windows contiguous, cache-friendly linear scan
   - Range queries use partition_point (binary search) then linear scan — no pointer chasing
   - min_tr/max_tr precomputed for O(1) epoch-skip check

3. Flat primary storage (MutableEpoch):
   - label_map: HashMap<MetricID, BTreeMap<TimestampRange, Vec<Arc<Agg>>>> replaced by
     data: HashMap<(MetricID, TimestampRange), Vec<Arc<Agg>>>
   - O(1) insert and point lookup; no nested BTreeMap traversal

per_key.rs / global.rs updated:
   - StoreKeyData/PerKeyState now hold current_epoch: MutableEpoch + sealed_epochs: BTreeMap<EpochID, SealedEpoch>
   - maybe_rotate_epoch calls MutableEpoch::seal() and inserts into sealed_epochs
   - cleanup_read_based updated for current + sealed epoch split

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MutableEpoch is now a plain append-only Vec (no BTreeMap, no sorted Vec
maintenance during writes). All sorting is deferred to seal() — paid once
at epoch rotation, not on every insert. Mirrors VictoriaMetrics' rawRows
→ in-memory part pipeline.

Insert path: Vec::push + HashSet::insert + 2 scalar min/max updates = O(1).
seal() path: sort_unstable_by_key = O(M log M), called once per epoch.

Query on active epoch: linear scan O(M), bounded by epoch_capacity × L.
Acceptable since sealed epochs hold most historical data and use binary search.

Replace min_tr/max_tr (TimestampRange) with min_start/max_end (u64) in
both MutableEpoch and SealedEpoch for accurate epoch-skip bounds.
Callers updated to use time_bounds() -> Option<(u64, u64)>.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MutableEpoch now maintains a secondary index:
  window_to_ids: HashMap<TimestampRange, Vec<(MetricID, Arc<Agg>)>>

On insert: Arc::clone into window_to_ids (refcount bump only, no data copy)
  + Vec::push — O(1) amortized, no change to insert complexity.

exact_query: HashMap lookup O(1) + iterate m entries O(m), no raw scan.
  Previously O(M) linear scan of all raw entries.

range_query_into: unchanged linear scan of raw (O(M), bounded).
seal(): unchanged — window_to_ids dropped, raw is sorted in-place.
remove_windows: also removes from window_to_ids.

Memory: one extra Arc pointer (8 bytes) per inserted entry — cheap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ndex, batch hoisting)

- Columnar storage: three parallel arrays (windows_col, metric_ids_col,
  aggregates_col) instead of row tuples; range scan hot loop touches only
  windows_col
- Lazy window_to_ids index: built on first exact_query after a write batch,
  invalidated cheaply (= None) on insert — zero index maintenance on hot path
- Monotonic ingest fast path: skip windows_set HashSet probe for consecutive
  same-window inserts (Opt 3)
- with_capacity hint: MutableEpoch::with_capacity uses previous epoch len to
  avoid Vec reallocation during next epoch fill
- Batch metadata hoisting in global/per_key: config lookup, metrics.insert,
  earliest_ts update, items_inserted count moved from per-item to per-group

Results: ~2x insert, ~3x range query (Sum), ~27x range query (KLL) vs legacy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…h design

Replace the old EpochData/BTreeMap description with the current implementation:
- MutableEpoch: columnar storage (3 parallel arrays), lazy window_to_ids index,
  monotonic ingest fast path, incremental bounds tracking
- SealedEpoch: flat sorted Vec with binary-search range/exact queries
- Updated complexity table (insert O(1) amortized, range O(log N + k) on sealed)
- Updated query mechanics to reflect write-lock for exact query (lazy index build)
- Remove asap-query-engine/docs/simple_store_insert_profile.md (profiling scratch doc)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The epoch-based rotation was dropping an entire epoch (epoch_capacity
windows) when the retention limit was exceeded. Legacy evicts exactly
(total - retention_limit) windows, which can be fewer than one full epoch.

Fix: after sealing, compute total distinct windows across all epochs in
O(E) using SealedEpoch::distinct_window_count() (precomputed at seal time,
updated in remove_windows). Evict the minimum number of oldest windows
from the oldest sealed epoch(s) needed to reach retention_limit, dropping
the epoch only when fully emptied.

Also adds the eviction check to the non-rotation path so the 9th window
(still in the current partial epoch) triggers eviction of the 1st window.

Fixes: contract_global and contract_per_key (both now pass).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These files were modified during early development on this branch but
those changes were superseded by the new global.rs/per_key.rs stores.
Reset to simple_store_opt versions so they don't appear as unintended
changes in the PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zzylol zzylol force-pushed the 130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups branch from 7032bfd to 8e0b4e3 Compare March 24, 2026 17:40
…d ordering

Legacy global/per_key stores were returning Box from clone_boxed_core() but
TimestampedBucket now expects Arc. Add .into() at the 4 call sites. Also
reorder mod.rs to put `mod common` before `pub mod legacy` for cargo fmt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…chable

Without pub mod global and pub mod per_key in mod.rs, the compiler sees all
types in common.rs as dead code and fails under -D warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@milindsrivastava1997 milindsrivastava1997 merged commit 71100f9 into main Mar 27, 2026
4 checks passed
@milindsrivastava1997 milindsrivastava1997 deleted the 130-change-simplestore-to-have-a-better-indexing-for-time-and-label-lookups branch March 27, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change SimpleStore to have a better indexing for time and label lookups

2 participants