Skip to content

Record DaemonMode.ExternallyManaged for Marten + Polecat under Wolverine-managed distribution (closes #3290)#3330

Merged
jeremydmiller merged 5 commits into
mainfrom
fix/3290-externally-managed-mode
Jul 7, 2026
Merged

Record DaemonMode.ExternallyManaged for Marten + Polecat under Wolverine-managed distribution (closes #3290)#3330
jeremydmiller merged 5 commits into
mainfrom
fix/3290-externally-managed-mode

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Closes #3290. The correct replacement for the closed #3329: instead of claiming HotCold (which would activate the store's own daemon coordination in parallel with Wolverine's), the integrations now record the new DaemonMode.ExternallyManaged (JasperFx 2.21.0, #490) — the store hosts nothing and warns nothing; Wolverine runs the projections.

Changes

  • Marten: MartenOverrides.Configure (main + ancillary stores via MartenOverrides<T>) sets AsyncMode = ExternallyManaged when managed event-subscription distribution is enabled and the mode is still Disabled — an explicit user AddAsyncDaemon(...) choice is never overridden, in either call order (both orders tested, which Suppress misleading 'async daemon is disabled' warning under Wolverine-managed event subscription distribution (#3290) #3329 didn't cover).
  • Polecat: identical guard in PolecatOverrides + PolecatOverrides<T> — a parallel audit found the same gap in the Polecat integration (UseWolverineManagedEventSubscriptionDistribution existed but nothing recorded the mode). The polecat repo itself needs no changes (it never had the misleading warning; all its AsyncMode readers are safe).
  • Consumes JasperFx 2.21.0.

Tests (5 per store, net9.0 + net10.0, run one TFM at a time; Polecat against real SQL Server)

Mode recorded under managed distribution; nothing store-hosted starts (no store coordinator/daemon among hosted services — the exact hazard that sank #3329); warning preserved without managed distribution; explicit AddAsyncDaemon(Solo) preserved in both call orders. Marten-side silence is guaranteed by marten#4865 (Marten's warning gate fires only on Disabled) — verified empirically here against published Marten.

Note: the failing CIMarten/CIAWS checks on sibling PRs are pre-existing on main (same subscription tests fail on main's own CI runs) — unrelated to this change.

🤖 Generated with Claude Code

jeremydmiller and others added 5 commits July 6, 2026 19:28
…scription distribution (#3290)

UseWolverineManagedEventSubscriptionDistribution replaces Marten's own
AddAsyncDaemon() coordination outright, but Marten's only knowledge of the
daemon state is Projections.AsyncMode. Left at Disabled, DocumentStore wrote
a misleading "The async daemon is disabled ... projections will not be
executed" console warning at startup even though Wolverine IS running the
async projections.

MartenOverrides (the IConfigureMarten hook covering the main store and, via
MartenOverrides<T>, every ancillary store) now records the real state as
DaemonMode.ExternallyManaged (#490): identical runtime posture to
Disabled — Marten hosts no coordinator and starts no agents — but the
warning gate stays quiet because the external host runs the projections.
Only upgrades from Disabled, so an explicit user AddAsyncDaemon() choice is
never overwritten in either call order.

Replaces the closed #3329, whose AsyncMode = HotCold approach was rejected
for implying Marten's own coordination runs in parallel.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed distribution (#3290)

Polecat parity with the Marten side: UseWolverineManagedEventSubscriptionDistribution
replaces Polecat's own AddAsyncDaemon()/AddProjectionCoordinator() hosting outright,
but the store's only knowledge of the daemon state is DaemonSettings.AsyncMode,
which the integration never set. PolecatOverrides (main store) and
PolecatOverrides<T> (ancillary stores, deferring to the main PolecatIntegration
flag exactly like the IProjectionCoordinator<T> factory does) now record
DaemonMode.ExternallyManaged (#490): identical runtime posture to Disabled —
nothing Polecat-hosted starts — while any AsyncMode reader sees that async
projections DO run under Wolverine's distribution. Only upgrades from Disabled,
so an explicit user daemon choice is never overwritten in either call order.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit 18a886f into main Jul 7, 2026
25 of 26 checks passed
This was referenced Jul 9, 2026
This was referenced Jul 14, 2026
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.

Misleading 'async daemon is disabled' warning with UseWolverineManagedEventSubscriptionDistribution = true

1 participant