Repository navigation
Conversation
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 8, 2026 08:18
cb87b5b to
1661193
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
3 times, most recently
from
October 9, 2026 06:02
4fde3e9 to
551b86a
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 15, 2026 18:13
551b86a to
39598c7
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 15, 2026 19:15
39598c7 to
5c9e548
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
2 times, most recently
from
October 21, 2026 08:48
3fa9a24 to
d4a90ae
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 21, 2026 09:12
d4a90ae to
82ef797
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
2 times, most recently
from
October 21, 2026 09:52
18d433a to
050c9de
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 21, 2026 11:16
050c9de to
6914f1c
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
2 times, most recently
from
October 21, 2026 14:07
6b86dec to
c402249
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 21, 2026 14:43
c402249 to
9f50fcb
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 21, 2026 17:05
9f50fcb to
6b2ae83
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 21, 2026 17:15
6b2ae83 to
009e40e
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
2 times, most recently
from
October 22, 2026 19:46
9262ddb to
1a3daac
Compare
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
5 times, most recently
from
October 24, 2026 02:49
e9be794 to
133ce8b
Compare
LookupKeys now takes the range of event ids the query needs and reports the range its answer covers. Matches first asks for the leading four slabs of the window, in the walk's direction. It asks for the rest only if the page is still not full and the first answer did not already cover it. Both readers still return whole terms, so they report the whole id space and every query runs in one stage, as before. The point is the next step: a reader that stores a large term in pieces can then read only the pieces a page reaches. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QHnF5BhsuoxpWxGmatQzmt
tamirms
force-pushed
the
tamirms/events-windowed-matches
branch
from
October 28, 2026 08:05
133ce8b to
18bac35
Compare
Comments only, apart from two test-file moves: everyID now sits above wholeChunk's doc comment instead of inside it, and the candidate-free-slab fixture, which has one caller, is back inline in its test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The regression test stays within the first stage, so its one-lookup assertion cannot detect whether Matches ignores whole-term coverage.
1 open issue
What changed in this PR
Prepares event queries for partially stored term bitmaps by adding lookup windows and coverage-aware, two-stage matching. Current hot and cold readers still return whole terms, preserving single-stage execution and existing results and I/O.
Changes:
- Extend
Reader.LookupKeysto accept a requested window and report its covered range. - Match the leading four slabs first, requesting the remainder only when needed.
- Update reader implementations, test doubles, and tests for coverage boundaries and batch hints.
| File | Description |
|---|---|
cmd/stellar-rpc/internal/rpcv2/stores/hotchunk/hotchunk_test.go |
Update lookups to pass whole-term windows. |
cmd/stellar-rpc/internal/rpcv2/stores/event/slab_match.go |
Scope slab plans to stages and count emitted matches. |
cmd/stellar-rpc/internal/rpcv2/stores/event/slab_match_test.go |
Add coverage-contract and stage-scheduling tests. |
cmd/stellar-rpc/internal/rpcv2/stores/event/reader.go |
Define windowed lookup and coverage contracts. |
cmd/stellar-rpc/internal/rpcv2/stores/event/matches_differential_test.go |
Adapt the differential reader to exercise staged matching. |
cmd/stellar-rpc/internal/rpcv2/stores/event/match.go |
Implement coverage-aware stages and carry batch hints forward. |
cmd/stellar-rpc/internal/rpcv2/stores/event/match_test.go |
Test batch hints across stage boundaries. |
cmd/stellar-rpc/internal/rpcv2/stores/event/hot_store.go |
Adopt the lookup signature while retaining whole-term snapshots. |
cmd/stellar-rpc/internal/rpcv2/stores/event/hot_store_test.go |
Update calls and assert whole-space coverage. |
cmd/stellar-rpc/internal/rpcv2/stores/event/cold_reader.go |
Report whole-space coverage without changing index reads. |
cmd/stellar-rpc/internal/rpcv2/stores/event/cold_reader_test.go |
Update calls and verify reported coverage. |
cmd/stellar-rpc/internal/rpcv2/query/event_page_test.go |
Adapt the paging test reader to windowed lookups. |
cmd/stellar-rpc/internal/rpcv2/ingest/ingest_test.go |
Update ingest readback tests for the lookup signature. |
Review effort: Balanced
| // TestMatches_WholeTermLookupIsOneStage pins that a lookup covering every id | ||
| // makes one stage, without moving the stream. | ||
| func TestMatches_WholeTermLookupIsOneStage(t *testing.T) { | ||
| f := newShapedFixture(t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Reader.LookupKeysnow takes the range of event ids the query needs (the window) and returns, alongside the bitmaps, the range its answer covers.Matchesasks first for the leading four slabs of the window, in the walk's direction. It asks for the rest only if the page is still not full and the first answer didn't already cover it.Why
Groundwork for the next PR, which stores a popular term's bitmap in parts. With a window, the cold reader can read only the parts a page reaches and report exactly what it read. On its own, this PR changes neither results nor I/O.
Known limitations
N/A
🤖 Generated with Claude Code