Repository navigation
GH-1172 StreamLockedException carries every stream that lost the lock (StreamIds) - #1176
Merged
Merged
Conversation
Additive surface so Fisher can drop its own subclass and throw the shared type: a public constructor taking IReadOnlyList<object> streamIds (StreamId and Id carry the first, an empty list is refused with ArgumentException) and a public StreamIds property that the existing constructors populate as [StreamId], so it is never empty. The canonical message names every id when there is more than one and gains a store-neutral remedy hint. No existing constructor or member changes shape; no version bump, this lands in 3.1.0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Merged
This was referenced Nov 16, 2026
Closed
Closed
Closed
This was referenced Nov 30, 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 #1172
Additive surface on
JasperFx.Events.StreamLockedException, so Fisher can deleteFisher.Exceptions.StreamLockedExceptionand throw the shared type directly fromFisherSession(the #1133 ruling: a shared exception is one JasperFx.Events type, and a store's extra state moves up first). Fisher's extra state is the list of streams: SQLite takes one writer per file, so every stream in a unit of work loses the lock together.New public surface
Message
The canonical message names every id when there is more than one, and gains a store-neutral remedy hint (one sentence):
Stream '13' may be locked for updates; retry the operation, or reduce the number of concurrent writersStreams 'ledger/1', 'ledger/2' may be locked for updates; retry the operation, or reduce the number of concurrent writersA list of one id gets the single-stream wording. Marten's subclass goes through the protected message constructor and keeps its own wording; Wolverine's only assertion on this message is a
ShouldContain("may be locked for updates"), which still holds. The one exact-message test in this repository (LiftedStoreExceptionTests) is updated.Not in this PR
No version bump in
Directory.Build.props(this lands in 3.1.0 after 3.0.1 ships), noCHANGELOG.mdentry, no change to the existing constructors or members.Verification
dotnet build jasperfx.slnx -c Releasedotnet test --project src/EventTests -f net10.0(full suite) and--filter-class "*LiftedStoreExceptionTests*"for the fivestream_locked_*tests: the list constructor exposesStreamIds/StreamId/Id, the single-id constructor yields a one-elementStreamIds, the message names all ids for several and keeps the single-stream wording for one, and the empty list is refused.🤖 Generated with Claude Code