Skip to content

docs: streaming reads and ReadStreamToEnd - #8

Open
alexeyzimarev wants to merge 1 commit into
mainfrom
docs/streaming-reads
Open

docs: streaming reads and ReadStreamToEnd#8
alexeyzimarev wants to merge 1 commit into
mainfrom
docs/streaming-reads

Conversation

@alexeyzimarev

Copy link
Copy Markdown
Contributor

Documents the changes from Eventuous/eventuous#568 (fixes Eventuous/eventuous#567):

  • Memory semantics of IEventReader.ReadEvents/ReadEventsBackwards: KurrentDB streams events as they arrive; relational stores buffer up to count per call
  • New ReadStreamToEnd extension as the way to read a whole stream with bounded memory, instead of count: int.MaxValue
  • Adds ReadEventsBackwards to the event store operations table

Updated pages: dotnet-next/whats-new and dotnet-next/persistence/event-store.

🤖 Generated with Claude Code

Document the memory semantics of IEventReader reads (KurrentDB streams,
relational stores buffer up to count) and the new ReadStreamToEnd extension
for reading a whole stream with bounded memory, replacing the
count: int.MaxValue idiom. Matches Eventuous/eventuous#568.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Docs: clarify streaming reads and introduce ReadStreamToEnd guidance

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Document IEventReader streaming vs buffering semantics across store implementations.
• Recommend ReadStreamToEnd for bounded-memory full-stream reads (replacing int.MaxValue).
• Update event store operations table and dotnet-next “What’s new” examples.
Diagram

graph TD
  D1["event-store.md"] --> API["IEventReader API"] --> EXT["ReadStreamToEnd"] --> PAG["Paged reads (500)"]
  D2["whats-new.mdx"] --> API
  API --> KDB["KurrentDBEventStore"]
  API --> RDB["Relational stores"]
  D1 --> RS["ReadStream"] --> PAG
Loading
High-Level Assessment

The PR’s approach—explicitly documenting store-dependent buffering behavior and steering users toward ReadStreamToEnd for bounded-memory reads—is the most direct way to prevent misuse (e.g., count: int.MaxValue) without adding API churn.

Files changed (2) +42 / -9

Documentation (2) +42 / -9
event-store.mdAdd read semantics + ReadStreamToEnd guidance; include ReadEventsBackwards in ops table +28/-9

Add read semantics + ReadStreamToEnd guidance; include ReadEventsBackwards in ops table

• Expands the operations table to include 'ReadEventsBackwards'. Documents that 'IEventReader.ReadEvents' returns 'IAsyncEnumerable<StreamEvent>' and clarifies memory semantics: KurrentDB streams events while relational stores can buffer up to 'count'. Adds a new “Reading a whole stream” section recommending 'ReadStreamToEnd' (paged, bounded memory) and notes 'pageSize'/'failIfNotFound' usage; points to 'ReadStream' for array materialization.

src/content/docs/dotnet-next/persistence/event-store.md

whats-new.mdxUpdate release notes with buffering semantics and ReadStreamToEnd example +14/-0

Update release notes with buffering semantics and ReadStreamToEnd example

• Adds a note explaining store-dependent memory behavior for streaming reads (KurrentDB streaming vs relational buffering). Introduces a “Read a whole stream with ReadStreamToEnd” section with an example and guidance on 'pageSize', 'failIfNotFound', and when to use 'ReadStream' to collect into an array.

src/content/docs/dotnet-next/whats-new.mdx

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
eventuous-docs 70277cf Commit Preview URL

Branch Preview URL
Aug 12 2026, 04:51 PM

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

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.

KurrentDB ReadEvents buffers the entire requested range before yielding — IAsyncEnumerable is not actually streaming

1 participant