Skip to content

End GetRecords iterators after closed shard exhaustion - #371

Closed
forhappy wants to merge 1 commit into
ExtendDB:mainfrom
forhappy:codex/stream-completion
Closed

forhappy wants to merge 1 commit into
ExtendDB:mainfrom
forhappy:codex/stream-completion

Conversation

@forhappy

Copy link
Copy Markdown

Summary

  • Give StreamEngine::get_stream_records an explicit continuation state so an empty open shard remains pollable and an exhausted closed shard ends its iterator.
  • Update the engine and SQLite, PostgreSQL, and MongoDB producers together. Each producer reads one lookahead record and returns the final page's records before ending the iterator.
  • Document the closed-shard behavior and the 1,000-record page limit.

Verification

  • SQLite open/closed, final-page, and account-isolation unit tests pass.
  • Engine iterator continuation and current-main sequence-padding unit tests pass.
  • PostgreSQL and MongoDB adapters compile against the changed trait.
  • Strict Clippy for the storage, engine, SQLite, PostgreSQL, and MongoDB crates, plus workspace format and diff checks, pass.

PostgreSQL and MongoDB runtime integration tests remain to be run in their database environments. This changes the storage trait consumed by external backends, so review of that contract is especially useful.

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