fix: scroll sequential walks were racing and re-reading page one#153
Open
tellet-q wants to merge 2 commits into
Open
fix: scroll sequential walks were racing and re-reading page one#153tellet-q wants to merge 2 commits into
sequential walks were racing and re-reading page one#153tellet-q wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes sequential scroll concurrency so concurrent walks don’t all start from offset None (page one), which previously caused lockstep re-reads and cache hits instead of genuine disk reads. It also removes the previous --rps + mode: sequential prohibition by introducing a walk pool that prevents sharing a cursor between concurrent requests.
Changes:
- Replaces per-worker fixed walk slots with a mutex-protected pool of in-progress walks that are checked out per request and returned advanced.
- Seeds new sequential walks from a random point (via a
sample: randomquery) to avoid concurrent walks re-reading the same initial pages. - Removes the
--rpsguard for sequential mode and updates docs/examples to reflect the new sequential behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/scroll.rs | Implements the walk pool and random seeding for sequential mode; removes slot-based walk sharing. |
| src/main.rs | Drops the --rps + sequential-mode bail-out now that walks are no longer shared by slot. |
| README.md | Updates sequential mode documentation to describe random seeding / reduced overlap for concurrent walks. |
| examples/scroll-config.yaml | Updates config comments to match the new sequential walk behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
before:
walk 0 ─┐
walk 1 ─┼─ all from point 0 ──▶ 1 disk read, N−1 cache hits
walk N ─┘
after:
walk 0 ──── from random point A ──▶
walk 1 ──── from random point B ──▶ each page read once, from disk
walk N ──── from random point C ──▶