Allow reading events from a position with AppendStore::query() - #924
Merged
Merged
Conversation
The DCB spec says a store should provide a way to read events from a given starting position. AppendStore::query() always returned all matching events. query() now takes an optional `from` index (inclusive). It only limits what is read, the query itself and the append condition stay the same. This is the base for cutting off irrelevant history when building a decision model.
|
Hello 👋 here is the most recent benchmark result:
This comment gets update everytime a new commit comes in! |
DanielBadura
approved these changes
Oct 3, 2026
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.
The DCB spec says a store "SHOULD provide a way to read Events from a given starting Sequence Position".
AppendStore::query()always returned all matching events, so we didn't cover that yet.query()now takes an optionalfromindex, which is inclusive like in the reference implementation on dcb.events:It only limits what is read. What matches is still defined by tags and event types alone, and the append condition is unaffected. Combined with
onlyLastEvent, the last matching event is looked up first and dropped if it is beforefrom, the same in both stores.This is meant as the base for a split stream equivalent in DCB: the decision model builder looks up the last split event of a projection and reads from there, while the store doesn't need to know anything about split events.