Fix RavenDb durability agent 'Unrecognized agent scheme' error#2261
Merged
Conversation
…of 'ravendb' Closes #2260 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 9, 2026
This was referenced Mar 22, 2026
This was referenced Mar 29, 2026
This was referenced Apr 5, 2026
This was referenced May 20, 2026
jeremydmiller
added a commit
that referenced
this pull request
May 20, 2026
… of 'cosmosdb' (#2863) Closes #2845. CosmosDbMessageStore.Uri and CosmosDbDurabilityAgent.Uri were built as cosmosdb://durability. MessageStoreCollection (the wolverinedb agent family) advertises every store's Uri via AllKnownAgentsAsync and distributes them under the wolverinedb scheme, so NodeAgentController tried to start cosmosdb://durability and findAgentAsync threw "Unrecognized agent scheme 'cosmosdb'" every poll cycle. Same class of bug as the RavenDb fix in #2261. Switches both URIs to wolverinedb://cosmosdb/durability so the scheme resolves to MessageStoreCollection, which builds the durability agent via the store's BuildAgent. Because the agent is now cluster-managed (NodeAgentController calls StartAsync on it), CosmosDbMessageStore.StartScheduledJobs must no longer eagerly call StartTimers() — doing so would leave two pollers racing on the same store, the #2623 duplicate-poller bug. The agent built in StartScheduledJobs is retained only for disposal-time StopAsync. The existing durability_agent_lifecycle guard already asserts exactly one polling agent across both sources. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jeremydmiller
added a commit
that referenced
this pull request
May 20, 2026
… of 'cosmosdb' (#2864) Closes #2845. CosmosDbMessageStore.Uri and CosmosDbDurabilityAgent.Uri were built as cosmosdb://durability. MessageStoreCollection (the wolverinedb agent family) advertises every store's Uri via AllKnownAgentsAsync and distributes them under the wolverinedb scheme, so NodeAgentController tried to start cosmosdb://durability and findAgentAsync threw "Unrecognized agent scheme 'cosmosdb'" every poll cycle. Same class of bug as the RavenDb fix in #2261. Switches both URIs to wolverinedb://cosmosdb/durability so the scheme resolves to MessageStoreCollection, which builds the durability agent via the store's BuildAgent. Because the agent is now cluster-managed (NodeAgentController calls StartAsync on it), CosmosDbMessageStore.StartScheduledJobs must no longer eagerly call StartTimers() — doing so would leave two pollers racing on the same store, the #2623 duplicate-poller bug. The agent built in StartScheduledJobs is retained only for disposal-time StopAsync. The existing durability_agent_lifecycle guard already asserts exactly one polling agent across both sources. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
RavenDbDurabilityAgentandRavenDbMessageStoreused aravendb://URI scheme, butNodeAgentControlleronly registersMessageStoreCollectionunder thewolverinedbscheme (PersistenceConstants.AgentScheme). This caused anArgumentOutOfRangeException: Unrecognized agent scheme 'ravendb'on startup, preventing the durability agent from starting.ravendb://durabilitytowolverinedb://ravendb/durabilityto match the scheme expected by the agent controller.Closes #2260
Test plan
🤖 Generated with Claude Code