Skip to content

feat(indexing): support in-memory index reads#409

Merged
yordis merged 1 commit into
masterfrom
yordis/feat-index-in-memory-reader
Jun 28, 2026
Merged

feat(indexing): support in-memory index reads#409
yordis merged 1 commit into
masterfrom
yordis/feat-index-in-memory-reader

Conversation

@yordis

@yordis yordis commented Jun 28, 2026

Copy link
Copy Markdown
Member
  • Indexing-owned streams need a local read boundary before lifecycle wiring can safely expose concrete components.
  • Keeping paging and metadata behavior covered in isolation reduces risk when later components begin publishing index records.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor

cursor Bot commented Jun 28, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
New isolated indexing storage components with no production wiring in this diff; behavior is covered by unit tests and does not alter existing read paths until integrated.

Overview
Adds an in-memory read path for indexing-owned streams: a thread-safe InMemoryIndexEventBuffer that accepts sequentially numbered index events for a single IndexStreamId, and InMemoryIndexVirtualStreamReader, which implements forward/backward stream reads and last-event / last-indexed metadata from buffer snapshots.

Read behavior matches existing virtual-stream semantics (empty stream → NoStream, paging, negative from handling, end-of-stream flags, TfLastCommitPosition). The reader plugs into the existing VirtualStreamReader composite via IndexVirtualStreamReader.

XUnit coverage exercises buffer validation (null args, stream id mismatch, gap in event numbers) and reader edge cases, including routing through VirtualStreamReader.

Reviewed by Cursor Bugbot for commit 3498ebc. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@yordis, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 7 minutes and 3 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 14ce007d-5691-44a5-b897-f8321aa8aac9

📥 Commits

Reviewing files that changed from the base of the PR and between cda6d10 and 3498ebc.

📒 Files selected for processing (3)
  • src/EventStore.Core.XUnit.Tests/Services/Storage/Indexing/InMemoryIndexVirtualStreamReaderTests.cs
  • src/EventStore.Core/Services/Storage/Indexing/InMemoryIndexEventBuffer.cs
  • src/EventStore.Core/Services/Storage/Indexing/InMemoryIndexVirtualStreamReader.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/feat-index-in-memory-reader

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yordis yordis merged commit 9cd4d2b into master Jun 28, 2026
21 checks passed
@yordis yordis deleted the yordis/feat-index-in-memory-reader branch June 28, 2026 23:18
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