Repository navigation
Marten 9.57.0
Highlights
- Compaction no longer deletes the history of a stream that folds to null. A stream deleted by its own aggregate, through
ShouldDeleteorDeleteEvent<T>, used to lose its whole history to an empty snapshot. Compaction now leaves it alone and logs an information line. (#5797) - Event data masking now reaches archived and skipped events.
IncludeStreamandIncludeEventsused to leave those rows in plain text and report success. (#5797) opts.Events.AutoDiscoverTagTypesturns off automatic DCB tag type registration, for stores that use strong-typed identifiers but not DCB. It's on by default, and explicitRegisterTagType<T>()calls work either way. Thanks to @gschuager for the report and the design. (#5806)EventStoreUsagereports the event store'sTenancyStyle, so a console can tell conjoined events from conjoined documents. (#5805)- JasperFx 2.98.0 and Weasel 9.48.0.
Action needed after upgrading
If you rely on masking for archived or skipped events: run the same ApplyEventDataMasking call again. Data that was archived or skipped when you last ran it is still in plain text until you do.
That call runs your rules again over everything the first pass reached. If a rule isn't safe to run twice, such as one that draws a new pseudonym, add x.IsArchived to an IncludeEvents filter that still names the same subject:
x.IncludeEvents(e => e.StreamId == streamId && e.IsArchived)Never use x.IsArchived as the whole filter, because that masks every archived event in the store.
If you compact streams: the deleted events can't be rebuilt from Marten. To find affected streams, replace <schema> and run this, then restore those streams from a backup or from wherever an archiver copied them:
select stream_id, version, tenant_id
from <schema>.mt_events
where mt_dotnet_type like 'JasperFx.Events.Compacted%'
and 'null'::jsonb in (data->'Snapshot', data->'snapshot');An archiver closed over IDocumentSession was never called for past compactions, so that copy won't exist.
Behaviour changes
IncludeEventsnow includes archived events. A masking filter that needs only live events should add!x.IsArchived.- An events archiver closed over anything other than
IDocumentOperationsorIDocumentSessionnow throwsInvalidOperationExceptionbefore anything is queued. It used to be skipped silently, with the events deleted anyway. An archiver closed overIDocumentSessionis now called. - Weasel 9.48.0:
ToParameterTypenow throws for an unmapped type where it used to return a character catch-all. An enum resolves through its underlying type, so along-backed enum givesBigint. Marten's own call sites are not affected.
What's Changed
- JasperFx 2.98.0 by @jeremydmiller in #5801
- Bump fast-uri by @dependabot[bot] in #5796
- Keep a stream that folds to null, and mask archived and skipped events by @jeremydmiller in #5797
- Weasel 9.48.0 by @jeremydmiller in #5802
- Add opts.Events.AutoDiscoverTagTypes to turn off DCB tag type discovery by @jeremydmiller in #5806
- Report the event store's TenancyStyle on EventStoreUsage by @jeremydmiller in #5805
- Bump follow-redirects from 1.16.1 to 1.16.2 by @dependabot[bot] in #5804
- Bump node-forge from 1.4.0 to 1.4.2 by @dependabot[bot] in #5803
- Bump version to 9.57.0 by @jeremydmiller in #5807
Full Changelog: v9.56.0...V9.57.0