Fix Polecat projection agents not starting under managed distribution (#3168)#3169
Merged
Merged
Conversation
…#3168) EventSubscriptionAgentFamily keyed its store map by EventStoreIdentity.ToString() ("Name:Type", original casing) but rebuilt the lookup key from the agent URI in BuildAgentAsync, where the store Type rides in the URI authority — which System.Uri lowercases. Any store whose Identity.Type has uppercase letters (Polecat's is "SqlServer") therefore failed the reverse lookup with "Unknown event projection or subscription", so its projection agents never started under UseWolverineManagedEventSubscriptionDistribution, even single-node (node N: []). Marten was unaffected only because its Type is already lowercase ("marten"). Normalize the store key to a single casing at all three sites (keying, the BuildAgentAsync reverse lookup, and FindStore) via a documented StoreKey helper, matching System.Uri's own authority normalization. Adds a Polecat regression test asserting the three async projection agents actually run on one node (mirrors Marten's everything_is_started_up_on_one_node). Marten single + multi-node distribution tests still green (no double-start, no regression). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 23, 2026
Closed
This was referenced Jun 29, 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 #3168.
Root cause
Under
UseWolverineManagedEventSubscriptionDistribution, a Polecat-backed store's async projection agents surfaced (AllKnownAgentsAsyncreturned them) but never started — even single-node — with the node reporting no running agents (node N: []). Every start threw:EventSubscriptionAgentFamilykeyed its store map byEventStoreIdentity.ToString()("{Name}:{Type}", original casing →"Polecat:SqlServer"), butBuildAgentAsyncrebuilt the lookup key from the agent URI:$"{uri.Segments[1]}:{uri.Host}". The storeTyperides in the URI authority, whichSystem.Urilowercases →"Polecat:sqlserver"→ lookup miss → throw.Marten was unaffected purely because its
Identity.Typeis already lowercase ("marten"); it's a latent bug for any provider with an uppercaseType.Fix
Normalize the store key to one casing (matching
System.Uri's authority normalization) at all three sites — the_storeskeying, theBuildAgentAsyncreverse lookup, andFindStore— via a small documentedStoreKeyhelper in coreEventSubscriptionAgentFamily.Tests
polecat_managed_distribution_starts_agents_3168asserts the three async projection agents actually run on one node (mirrors Marten'severything_is_started_up_on_one_node). Fails before the fix (30s timeout,node N: []), passes after (~5s).WolverineProjectionCoordinatorpath is unchanged and identical to Marten's).dotnet build wolverine.slnx -c Releaseclean.🤖 Generated with Claude Code