Skip to content

Polecat 5.44.0

Choose a tag to compare

@jeremydmiller jeremydmiller released this 23 Oct 17:41
· 58 commits to main since this release
b880945

5.44.0 is a minor release: it picks up JasperFx 2.93 and implements the members it adds, and the store-agnostic high-water preview and advance from JasperFx 2.92.

Behaviour changes worth knowing about

Area Before After
Document-side store subject (#812, #814) IDocumentStoreDiagnostics.Subject, IDocumentStoreUsageSource.Subject and DocumentStoreUsage.SubjectUri returned the database URI (sqlserver://host/db/schema), while IEventStore.Subject returned polecat://main. All three return the store URI, polecat://{storename}, as Marten and Fisher do. The database identity stays on Database.DatabaseUri and the database descriptors.
Permanent SqlException from projection code under SkipApplyErrors (JasperFx 2.93, jasperfx#1029) Dead-lettered event by event. Pauses the shard with ShardFailure.IsTransient = false, because a missing column or a permissions error would fail every following event the same way. Transient errors (deadlocks, timeouts) are still retried, and a projection's own exceptions are still dead-lettered.
Console undelete moves the version (#813) — UndeleteDocumentAsync restores the row with a new version and last_modified. The application-level UndoDeleteWhere is unchanged.

New

  • Persisted projection start floors (#813, #809). Opt-in: set opts.Events.EnableProjectionFloors = true, which adds a pc_event_projection_floors table. Opt-out is planned for Polecat 6.
    • AsyncOptions.SubscribeFromFirstRun() now works on Polecat. It pins the high water as the projection's floor on its first start. Every later start begins at the larger of the stored progress and the floor, and a rebuild replays from the floor rather than from 0.
    • IEventDatabase.FetchProjectionFloorAsync, TrySetProjectionFloorAsync and SetProjectionFloorAsync give an operator get, insert-if-absent, and set or clear. A stored floor wins over a configured SubscribeFromSequence or SubscribeFromTime.
    • Floors outlive rebuild teardown and Advanced.Clean.
    • Without the flag there is no table and no schema delta. Every projection starts as before, and the floor writes throw a NotSupportedException that names the flag.
    • Docs
  • IDocumentStoreDiagnosticsWriter.UndeleteDocumentAsync (#813, jasperfx#1059): restores one soft-deleted document by type name and id. It answers NotFound for a live or missing row, ConcurrencyConflict for a stale expected version, and NotSupported for a type that hard-deletes.
  • DocumentQueryOptions.OrderByMetadata (#813, jasperfx#1058): order a document page by LastModified, Version or Created, for example newest first. It composes with Where, OrderBy, soft deletes and tenancy. Created is refused for a type that does not track it.
  • IEventStore.PreviewHighWaterAdvanceAsync / AdvanceHighWaterMarkToLatestAsync (#786, #796, JasperFx 2.92): the store-agnostic form of "jump-start a daemon held behind a gap", so CritterWatch's action works on SQL Server stores. The compare-and-set is atomic and a mark never moves backwards.

Compliance

  • Three suites newly enrolled: SoftDeleteCompliance, DocumentMetadataCompliance and ProjectionFloorCompliance.
  • DocumentStoreDiagnosticsCompliance gains 14 facts, for undelete and metadata ordering.
  • 62 suites are now enrolled.

Dependencies

  • JasperFx / JasperFx.Events 2.91.0 → 2.93.0:
    • 2.92.0 carries the high-water preview and advance (jasperfx#1031).
    • 2.93.0 carries undelete, metadata ordering, the two new document suites, start floors, and the jasperfx#1029 shard-pause change described above.