Repository navigation
Release v19.22.2
Observing materialized read-model instances failed on MongoDB: the sink subscribed through Arc's collection.Observe() on BsonDocument, and the subscriber got an error right after the first page. It now works on MongoDB, and observation is more reliable on every backend.
Changed
- Known limitation: during a replay, a lookup by key still reads the replay collection while lists read the primary one, as with the SQL sink (see #4391).
- Known limitation: materialized observation of a globally scoped projection may read the wrong namespace (see #4392).
- Known limitation: under sustained writes, pages queue behind each other; latest-wins delivery is proposed (see #4378).
- Each shared change stream watches its read-model database, which needs the
changeStreamandfindactions there. The built-inread/readWrite/dbOwnerroles grant both. See Cratis/Documentation#19.
Fixed
- MongoDB:
ObserveInstancesemits a fresh page after every change to the read model's collection, instead of failing after the first page. (#4365) - One change stream per collection: observers of the same collection share a single MongoDB change stream. It opens with the first observer and closes with the last, so many observers no longer hold one pooled connection each.
- Transient MongoDB errors (a stepdown, a lost connection, a read cut short by a rename) are retried with a short, bounded backoff. Observers get an error only if the failure persists, and each failure is logged.
- Replays: during a replay, observers and
GetInstancessee the primary collection, and the page and itsTotalCountcome from the same collection, as with the SQL sink. When the replay is promoted, observers get the replayed state without first flashing an empty page. A promoting collection left behind by an interrupted promotion doesn't block observation. - Empty read models: a read model with no instances yet, including one whose MongoDB collection was never created, emits an empty first page on MongoDB, InMemory and SQL alike.
- InMemory: readers see the primary collection during a replay, observers are told when the replay is promoted, and clearing the primary collection (initial run, removal) is announced.
- Page ordering: observed pages are delivered in the order the sink produced them, both in the kernel's gRPC service and in the .NET client's
IMaterializedReadModels.ObserveInstances. Before, a slow earlier page could arrive after a newer one. - .NET client: a failed materialized observation in read-model reactors is logged instead of being rethrown unhandled.