Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@

### Breaking Changes

- Async observer reads now use `EnumerateMongoAsync` to translate only cursor acquisition and advancement errors, matching synchronous `EnumerateMongo`. Mongo exceptions from application deserializers, `OnNextAsync`, and cursor disposal reach `OnErrorAsync` unchanged instead of being wrapped as storage failures. Driver errors still retain the original exception as `InnerException`. No public observer signatures change. [#108](https://github.com/NEventStore/NEventStore.Persistence.MongoDB/issues/108)

- Default async observer reads invoke the protected `Task`-returning (non-result) `TryMongoAsync<T>` guard for acquisition and each batch advance, with no observer argument, rather than once around the whole read. The existing result-returning guard overload is not used by these observer reads. Overrides no longer encompass application callbacks or cleanup. Per-batch calls enforce disposed-engine checks like sync enumeration. Cursor disposal remains unconditional and outside translation, like sync `using`; a cleanup failure may replace an earlier error under normal `using` semantics. [#108](https://github.com/NEventStore/NEventStore.Persistence.MongoDB/issues/108)

- `EmptyRecycleBin()` and `EmptyRecycleBinAsync(...)` now translate checkpoint-read driver failures to `StorageException` or `StorageUnavailableException` (for `MongoConnectionException`), retaining the original inner exception. Consumers catching raw driver exceptions must handle the persistence exceptions instead. The existing protected virtual guard is still invoked once, but its callback now includes checkpoint acquisition and iteration before deletion. Non-driver exceptions and cancellation retain their identity. [#107](https://github.com/NEventStore/NEventStore.Persistence.MongoDB/issues/107)

- Synchronous reads reuse one cursor `MoveNext` callback per enumeration. Both protected virtual `TryMongo` overloads are still called for cursor acquisition and every batch attempt, including completion. Source and binary APIs are unchanged, but overrides that inspect callback reference identity now observe the same callback within an enumeration. [#91](https://github.com/NEventStore/NEventStore.Persistence.MongoDB/issues/91)
Expand All @@ -42,6 +46,8 @@

### Migration notes

- For async observer reads, handle application Mongo exceptions directly in `OnErrorAsync`. Set `MongoPersistenceOptions.WrapAsyncApplicationExceptions = true` to select the legacy whole-read guard once per operation, restoring legacy application/cleanup wrapping and protected guard scope. The option is read once per read and does not alter other async operations. Subclasses relying on whole-read timing, retries or interception should opt out or adapt to the new driver-operation scope. Cancellation, early-stop completion and terminal callback failures retain their observer contract. [#108](https://github.com/NEventStore/NEventStore.Persistence.MongoDB/issues/108)

- `Initialize()` now creates `GetFrom_RecycleBin_Index` on existing databases. No data backfill or old-index replacement is required, but deployments must budget index build time and disk/I/O costs and retain index-creation permission. Operators can pre-create the documented definition to move build work out of startup. See [recycle-bin rollout and indexing](docs/Recycle-Bin.md#recycle-lookup-index-and-deployment). [#87](https://github.com/NEventStore/NEventStore.Persistence.MongoDB/issues/87)

## 12.1.0
Expand Down
Loading
Loading