Skip to content

feat(data_plane): retire DualWriteSink; precompute writes go to SketchIndex only - #160

Merged
zzylol merged 1 commit into
mainfrom
feat/dual-write-index-only
May 13, 2026
Merged

zzylol merged 1 commit into
mainfrom
feat/dual-write-index-only

Conversation

@zzylol

@zzylol zzylol commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 5 M2.3.6a — first step of the SketchStore retirement. The production OutputSink is now SketchIndexSink (renamed + slimmed successor to DualWriteSink from PR #156); it writes ONLY to SketchIndex via append_precompute.

Reads migrated to SketchIndex in PR #159 (M2.3.5b), so the legacy SketchStore no longer participates in either ingest or query. The Store trait, store/{global,per_key,common}.rs, and the eviction service still exist; subsequent M2.3.6 sub-PRs delete them and rename SketchIndexSketchStore.

Test plan

  • cargo build --bin data_plane clean.
  • cargo test -p data_plane --lib — 804/806 (2 pre-existing schema_timeline_dispatch failures unrelated).
  • cargo check --workspace clean.

What's next

  • M2.3.6b: delete store/{global,per_key,common}.rs, the Store trait, StoreOutputSink, RawPassthroughSink, plus dependent infrastructure (SchemaEvictionService's drop_agg_id path, backfill processor's store writes, persistence). High blast radius — ~90 references.
  • M2.3.6c: rename SketchIndexSketchStore (the final name).

🤖 Generated with Claude Code

…hIndex only

Phase 5 M2.3.6a — first step of the SketchStore retirement. The
production OutputSink is now `SketchIndexSink` (renamed and
slimmed-down successor to `DualWriteSink` from PR #156); it writes
ONLY to `SketchIndex` via `append_precompute`. The legacy
`SketchStore` agg_id-keyed write path is gone from `main.rs`.

Reads have already migrated to `SketchIndex` in PR #159 (M2.3.5b),
so the legacy store no longer participates in either side of the
ingest / query loop. The `Store` trait, `store/{global,per_key,
common}.rs`, and the eviction service still exist; subsequent
M2.3.6 sub-PRs delete them and rename `SketchIndex → SketchStore`.

Test fixtures and the schema eviction service kept their existing
`Store` plumbing untouched (so this PR's blast radius stays
contained). 804/806 lib tests pass — the 2 pre-existing
`schema_timeline_dispatch` failures predate this change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 2ab140d into main May 13, 2026
zzylol added a commit that referenced this pull request May 13, 2026
Phase 5 M2.3.6c — adds `SketchIndex::start_persistence` and
`SketchIndexPersistence` (the live persistence harness — manifest +
part cache + flusher handle), and constructs one in `main.rs` when
`--persistence-enabled` is passed.

The new persistence layer writes to `<disk_path>/sketch_index/`, a
subdir distinct from the legacy `SketchStore` layout — keeps the
two coexisting until the legacy can be deleted in subsequent sub-PRs.

The flusher loop is unchanged — it's generic over `EpochSource`
(PR #162's `SketchIndex` impl drives the new path; the legacy
`SketchStorePerKey` impl drives the deprecated one which now sees
no writes after M2.3.6a / PR #160).

Read-back from disk on query is NOT in scope here — the in-memory
`query_range` / `query_precomputes_by_agg` paths don't yet consult
`PartCache`. That's a follow-up: subsequent M2.3.6 sub-PRs add the
disk-read glue (the legacy `SketchStorePerKey` similarly stubbed
this; see `source.rs:35`'s "Ok(None) until then" comment).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol deleted the feat/dual-write-index-only branch July 17, 2026 20:05
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.

1 participant