DI registrations create separate backing stores when tracing is disabled
メンテナーはふだん 7 日以内に返信
評価
調査の方向性
The issue names StoreRegistrationTests.cs under src/Extensions/test/Eventuous.Tests.DependencyInjection and describes the affected AddEventStore, AddEventReaderWriter, AddEventReader, and AddEventWriter APIs. Start by reviewing the existing regression tests and tracing how registrations resolve shared stores with diagnostics enabled and disabled. Done means the listed host, factory, scope, and diagnostics cases pass; the issue says an implementation is already committed locally, so check whether that work is still available before starting.
索引モデルが issue の本文から書いたものです。
説明
Related test issue
Discovered while implementing #608 — event-store dependency injection coverage.
Problem
With EventuousDiagnostics disabled, store registration methods register implementations or factories separately for each interface. Each interface therefore gets its own singleton rather than sharing one backing instance.
A successful append through IEventWriter can be followed by StreamNotFound when the same stream is read through IEventReader. This is reproducible with the stateful InMemoryEventStore; it is not a claim that persistent providers lose stored data. Factories can also run more than once, and standalone reader/writer registrations can ignore an already registered concrete store.
Affected APIs include the generic and factory overloads of AddEventStore<T>, AddEventReaderWriter<T>, and separately composed AddEventReader<T> / AddEventWriter<T>.
Reproduction
- Disable diagnostics, preserving the previous setting for restoration afterward.
- Build a host with
services.AddEventStore<InMemoryEventStore>(). - Resolve
IEventWriterandIEventReaderfrom that host. - Append an event to a new stream through the writer.
- Read that stream through the reader.
Actual: the read throws StreamNotFound because the interfaces resolve to different stores.
Expected: all interfaces registered for the same implementation share one backing singleton. Changing tracing configuration must not change which events are visible.
Fix and acceptance criteria
- Register the concrete implementation or factory once, then resolve interface aliases from that singleton.
- Verify append/read behavior through a real host for store, combined reader/writer, and separately registered reader/writer APIs.
- Cover generic and factory overloads with tracing enabled and disabled.
- Factories are invoked once for the shared instance, and interface resolutions remain singleton across scopes.
- Standalone reader/writer registrations reuse a pre-registered concrete instance without invoking a replacement factory.
- Tests restore the process-wide diagnostics setting and cannot race with other tests that observe it.
Existing regression tests and implementation
StoreRegistrationTests.cs in src/Extensions/test/Eventuous.Tests.DependencyInjection contains:
WrittenEventsAreVisibleThroughEveryRegisteredInterfaceStandaloneRegistrationUsesTheExistingBackingStore- The tracing-disabled cases of
RepeatedRegistrationKeepsOneServiceAndOneFactory
These scenarios failed before the production fix. The complete DI project passes all 31 tests on .NET 10 after the fixes for this issue and the companion registration issue.
An implementation is already committed locally on fix/issue-608-store-registrations, commit df3dbe48. It also fixes duplicate registrations and overridden services; this draft does not imply the fix has been published or merged.
- 主要言語
- C#
- スター
- 512
- フォーク
- 99
- 平均マージ
- 5日 6時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Eventuous/eventuous のほかの issue
-
MongoDB integration tests fail on newer GitHub Actions runner kernels対応中かも @nmummau が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Eventuous/eventuous#626 · コメント 2 件 ·
メンテナーはふだん 7 日以内に返信
-
`dotnet format style --verify-no-changes` fails with naming violations and unnecessary imports対応中かも @nmummau が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
Eventuous/eventuous#624 · コメント 1 件 ·
メンテナーはふだん 7 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Eventuous/eventuous#627 · コメント 1 件 ·
メンテナーはふだん 7 日以内に返信
-
SQL Server: `append_events` does not need the `@inserted` table variable対応中かも @nmummau が 7 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
Eventuous/eventuous#619 · コメント 1 件 ·
メンテナーはふだん 7 日以内に返信
-
SQL Server: stream reads do one key lookup per event, and `IDX_EventsStream` duplicates `UQ_StreamIdAndStreamPosition`対応中かも @nmummau が 7 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 18/100
Eventuous/eventuous#618 · コメント 1 件 ·
メンテナーはふだん 7 日以内に返信
Eventuous/eventuous の issue をすべて見る
似ている issue
-
The test-platform skill doesn't say what three of its failures look like対応中かも @yasmoradi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
bitfoundation/bitplatform#14022 ·
メンテナーはふだん 1 日以内に返信
-
area-TableView bug needs-triage team-Controls
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/microsoft-ui-xaml#12351 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
AudioClient and ImageClient file path overloads send the full local path as the multipart file name対応中かも @sebxt が今日担当しました。 オープンarea: audio area: images feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
openai/openai-dotnet#1453 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
Runtime diagnostics settings report canManage=true for every caller対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
elsa-workflows/elsa-foundation#3130 ·
メンテナーはふだん 1 日以内に返信