Skip to content

JasperFx 2.77.0

Choose a tag to compare

@jeremydmiller jeremydmiller released this 30 Sep 13:27

Highlights

IDocumentStoreDiagnostics grows up (#870, #927)

The store-agnostic document diagnostics contract that CritterWatch uses:

  • Filtering: DocumentQueryOptions gains Where, OrderBy, Arguments (Dynamic LINQ text, per #869) and IncludeSoftDeleted. If a store can't apply a filter, it must throw the new DocumentCriteriaNotSupportedException instead of returning an unfiltered page.
  • Store identity: new Subject URI, which pairs with IDocumentStoreUsageSource.Subject so a console can target the main store or an ancillary one.
  • Defined behaviour:
    • Soft-deleted rows are excluded by default.
    • In a hierarchy, results are limited to the requested type.
    • A null, empty or whitespace tenant means the default tenant (DocumentQueryOptions.NormalizeTenantId).
    • Text ids are converted to the stored id type.
  • Tenant-aware loads: new LoadDocumentAsync(type, id, tenantId) returns a StoredDocument. LoadDocumentJsonAsync now forwards to it.
  • Metadata in results: StoredDocument rows (version, last modified, created, tenant, deleted and deleted-at, .NET type) are on DocumentQueryResult.Documents.
  • Write sibling: new IDocumentStoreDiagnosticsWriter saves from JSON and deletes, with an expected-version check and a tenant.
  • Descriptors: DocumentStoreUsage.SerializerCasing, plus structured Indexes and DuplicatedFields on DocumentMappingDescriptor.
  • Compliance: new DocumentStoreDiagnosticsCompliance suite, with SoftDeleted<T>() and AddSubClass<TRoot, TSub>() on DocumentComplianceConfig.

⚠️ Breaking for implementers: IDocumentStoreDiagnostics.Subject and LoadDocumentAsync are abstract on purpose, so Marten, Polecat and Fisher all adopt the contract in the same wave. Tracking issues: JasperFx/marten#5543, JasperFx/polecat#706, JasperFx/fisher#364.

Also in this release

  • ShardState.LastUpdated (#924, #926): the progression row's last_updated now flows through AllProjectionProgress, which gives a signal for whether a shard is still alive.
  • Compliance: pins the phantom ProjectionDeleted on the async-daemon path (#917, #925). This is the deferred half of #893.
  • Source generator: simple-typed single-argument constructors are kept out of the generated EventTypes (marten#3942, #923).

Packages

  • JasperFx
  • JasperFx.Events
  • JasperFx.Events.ComplianceTests
  • JasperFx.Events.SourceGenerator
  • JasperFx.SourceGenerator
  • JasperFx.Aspire
  • JasperFx.Events.MicrosoftExtensionsAI

All seven are at 2.77.0. JasperFx.RuntimeCompiler is versioned independently and is unchanged.

Full Changelog: V2.76.1...V2.77.0