spike: FromEnd (last-N) query offset — design validation (DO NOT MERGE) - #457
Draft
Aaronontheweb wants to merge 1 commit into
Draft
spike: FromEnd (last-N) query offset — design validation (DO NOT MERGE)#457Aaronontheweb wants to merge 1 commit into
Aaronontheweb wants to merge 1 commit into
Conversation
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
…(DO NOT MERGE) Implements Offset.FromEnd(N) in MongoDbReadJournal for AllEvents, CurrentAllEvents, EventsByTag, and CurrentEventsByTag. Resolves FromEnd to a concrete BsonTimestamp ordering value by finding the Nth-from-last matching document. - MongoDbJournalQueries.FromEndOrderingQuery: sort desc, skip N, take 1 to find the exclusive-start anchor ordering value (N events before the window). - MongoDbJournal: handles FindFromEndOffset ask message, delegates to queries layer. - MongoDbReadJournal: adds ResolveFromEnd helper (Ask → ConcatMany) and FromEnd case to all 4 query methods (AllEvents, CurrentAllEvents, EventsByTag, CurrentEventsByTag). - MongoDbFromEndOffsetSpec: wires the new Akka.Persistence.TCK FromEndOffsetSpec against a Mongo2Go in-process MongoDB instance with ColorFruitTagger. - Bumps to Akka.NET 1.5.70-beta1 which carries the FromEnd type; AkkaHostingVersion stays at 1.5.67 (no Hosting beta1 published yet). Relates to akkadotnet/akka.net#8244
Aaronontheweb
force-pushed
the
spike/fromend-offset
branch
from
June 23, 2026 22:54
3a9c206 to
f205a4d
Compare
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.
Summary
Proof-of-concept implementation of
Offset.FromEnd(N)for the MongoDB read journal, parallel to the SQL spike in akkadotnet/Akka.Persistence.Sql#589.MongoDbJournalQueries.FromEndOrderingQuery— sort descending, skip N, take 1 to find the exclusive-start anchor ordering value (the event immediately before the last-N window)MongoDbJournal— handles newFindFromEndOffsetask message and delegates to the queries layerMongoDbReadJournal— addsResolveFromEndhelper (Ask → ConcatMany) and aFromEndcase to all 4 query methods (AllEvents,CurrentAllEvents,EventsByTag,CurrentEventsByTag)MongoDbFromEndOffsetSpec— wires the newAkka.Persistence.TCK.FromEndOffsetSpecagainst an in-process MongoDB instance (Mongo2Go) withColorFruitTagger1.5.70-beta1which carries theFromEndtype inAkka.Persistence.Query;AkkaHostingVersionstays at1.5.67(no Hosting beta1 published yet)Relates to akkadotnet/akka.net#8244
DO NOT MERGE — spike/design validation only