Skip to content

Fix RavenDb durability agent 'Unrecognized agent scheme' error#2261

Merged
jeremydmiller merged 1 commit into
mainfrom
fix/ravendb-durability-agent-scheme
Mar 5, 2026
Merged

Fix RavenDb durability agent 'Unrecognized agent scheme' error#2261
jeremydmiller merged 1 commit into
mainfrom
fix/ravendb-durability-agent-scheme

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Summary

  • RavenDbDurabilityAgent and RavenDbMessageStore used a ravendb:// URI scheme, but NodeAgentController only registers MessageStoreCollection under the wolverinedb scheme (PersistenceConstants.AgentScheme). This caused an ArgumentOutOfRangeException: Unrecognized agent scheme 'ravendb' on startup, preventing the durability agent from starting.
  • Changed both URIs from ravendb://durability to wolverinedb://ravendb/durability to match the scheme expected by the agent controller.

Closes #2260

Test plan

  • All 129 RavenDbTests pass

🤖 Generated with Claude Code

…of 'ravendb'

Closes #2260

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit 99cec1e into main Mar 5, 2026
4 of 11 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UseRavenDbPersistence() throws 'Unrecognized agent scheme ravendb' on startup

1 participant