DI registrations create separate backing stores when tracing is disabled
Maintainer thường phản hồi trong vòng 7 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 512
- Fork
- 99
- Merge trung bình
- 5 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Eventuous/eventuous
-
MongoDB integration tests fail on newer GitHub Actions runner kernelsCó thể đã có người làm @nmummau đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Eventuous/eventuous#626 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 7 ngày
-
`dotnet format style --verify-no-changes` fails with naming violations and unnecessary importsCó thể đã có người làm @nmummau đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Eventuous/eventuous#624 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Eventuous/eventuous#627 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 7 ngày
-
SQL Server: `append_events` does not need the `@inserted` table variableCó thể đã có người làm @nmummau đã nhận 6 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
Eventuous/eventuous#619 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 7 ngày
-
SQL Server: stream reads do one key lookup per event, and `IDX_EventsStream` duplicates `UQ_StreamIdAndStreamPosition`Có thể đã có người làm @nmummau đã nhận 6 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 18/100
Eventuous/eventuous#618 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 7 ngày
Tất cả issue của Eventuous/eventuous
Issue tương tự
-
Format request: .wbpzĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
KnifeLemon/Filee#294 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
応募に出す、展示スペースの図面を作るĐang mởmtg-decide submission
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Fialuxe/MouthOfGod_System#288 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
gavin-wolfe/wolfden#104 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] BD000104 misses curl/wget pipelines written across lines (implicit string concatenation)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
[BUG] Still libmicrohttpd dependency is not removed properly from External-Dependency-Info.txt fileCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởtype/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày