Override IEventStore.AllDatabases() on DocumentStore; consume JasperFx 2.2.0 (#4570)#4571
Merged
Merged
Conversation
…x 2.2.0 (#4570) Implements the store-agnostic database accessor added to JasperFx.Events.IEventStore in #387/#388. Marten + Wolverine hosts register IEventStore (the concrete DocumentStore) in DI but not IEventDatabase, so store-neutral tooling (e.g. CritterWatch) had no way to reach the per-database read abstractions. AllDatabases() delegates straight to ITenancy, mirroring IMartenStorage.AllDatabases(), and projects to IEventDatabase (IMartenDatabase does not itself extend it). Also bumps all JasperFx.* packages to 2.2.0 and the Marten version to 9.2.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 28, 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 #4570.
What
IEventStore.AllDatabases()onDocumentStore. Implements the store-agnostic database accessor added toJasperFx.Events.IEventStorein jasperfx#387 / jasperfx#388. A straight delegation toITenancy(Tenancy.BuildDatabases()), mirroring the existingIMartenStorage.AllDatabases(), projecting toIEventDatabaseviaOfType<>sinceIMartenDatabasedoes not itself extendIEventDatabase(only the concreteMartenDatabasedoes).JasperFx.*packages (JasperFx,JasperFx.Events,JasperFx.Events.SourceGenerator,JasperFx.SourceGenerator).Why
Store-agnostic monitoring/tooling (e.g. CritterWatch) needs an
IEventDatabaseto call the read abstractions —AllProjectionProgress(...),FetchDeadLetterCountsAsync(...)/CountDeadLetterEventsAsync(...). But a Marten + Wolverine host registersIEventStore(the concreteDocumentStore) in DI and does not registerIEventDatabase, soGetServices<IEventDatabase>()is empty.IEventStore.AllDatabases()is the store-neutral way to reach the databases.Test
Added
event_store_all_databases_returns_one_event_database_per_databaseto the multi-database (MultiTenantedDatabases) fixture inDocumentStore_IMartenStorage_implementation: assertsAllDatabases()returns oneIEventDatabaseper configured database and that each can serveAllProjectionProgress()/FetchDeadLetterCountsAsync(). Passes locally (10/10 in the fixture).🤖 Generated with Claude Code