Repository navigation
Stop truncating a projection's revision through int in StoreProjection (#5723) - #5747
Merged
Merged
Conversation
#5723) StoreProjection cast lastEvent.Version / lastEvent.Sequence through int before assigning them to the long Revision. A multi-stream projection's revision is the global sequence, so past int.MaxValue it wrapped negative in memory, defeating the ILongVersioned + bigint advice from #4526. The test moves mt_events_sequence past int.MaxValue and runs the continuous daemon: -2147483549 before, 2147483747 after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This was referenced Oct 24, 2026
Open
This was referenced Oct 31, 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.
Closes #5723.
DocumentSessionBase.ProjectionStorage.StoreProjectioncast both values throughintbefore assigning them to thelongRevision:A multi-stream projection's revision is the global
seq_id, so once that passedint.MaxValuethe revision wrapped negative in memory. That defeated #4526's advice to put such documents onILongVersionedwith abigintcolumn. Both casts are gone. AnintIRevisionedmember is still narrowed where the value is written back to the document; the #4614 tests pass, 9/9.Test
EventSourcingTests.Bugs.Bug_5723_multi_stream_long_revisionrestartsmt_events_sequencepastint.MaxValueand runs an asyncMultiStreamProjectionover anILongVersioneddocument through the continuous daemon:Version= -2147483549;Noticed, not changed
An inline multi-stream projection does not go through
StoreProjectionat all. JasperFx'sApplyInlinecallsStore(), which auto-increments the revision instead of taking it from the event. So an inline projection's revision is a write count, not the sequence. It is pre-existing, and probably intended, but worth knowing if anyone readsILongVersioned.Versionas a sequence on an inline projection.🤖 Generated with Claude Code