Fix RavenDb scheduled messages not being delivered when using a durable transport#2554
Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom Apr 21, 2026
Conversation
4233129 to
393d2bf
Compare
393d2bf to
195b5cf
Compare
jeremydmiller
approved these changes
Apr 21, 2026
Member
jeremydmiller
left a comment
There was a problem hiding this comment.
Thanks for the clean fix and regression test.
4 tasks
dmytro-pryvedeniuk
pushed a commit
to dmytro-pryvedeniuk/wolverine
that referenced
this pull request
Apr 22, 2026
Adds a CIRavenDb Nuke target that builds and exercises both RavenDbTests and RavenDbTests.LeaderElection one class (or one method, for leader election) at a time with retry, plus a dedicated GitHub Actions workflow. RavenDb tests use the embedded RavenDB.TestDriver, so no docker services are required. Also fixes DiscoverTestMethods so inherited [Fact] methods on a compliance base class (e.g. LeadershipElectionCompliance) are attributed to the concrete derived class — previously leader-election projects discovered zero methods, silently running nothing. Includes the merged community fixes (JasperFx#2554, JasperFx#2555) which repair RavenDb scheduled-job locking and guard RavenDb durability recovery against orphaned listener URIs; both ship with regression tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 23, 2026
Closed
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
I hit this chasing down why
bus.ScheduleAsync(...)against a durable external sender was not working in our app - we were seeing saga timeouts persisted to theIncomingMessagecollection in RavenDB, but they were never being delivered. We observed thatRavenDbDurabilityAgent.runScheduledJobswas never releasing these messages. After some digging, I traced it toRavenDbMessageStore.Locking.csand found the issue noted below.Root cause
TryAttainScheduledJobLockAsyncdecides between its two branches with:but nothing in this method (or anywhere else that matters to the scheduled lock) reads or writes
_leaderLock.Fix
_scheduledLockvariable_scheduledLock = nullat the end of the method (to match what happens inReleaseLeadershipLockAsync)