Skip to content

Release v19.125.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 13:40
a8f630c

Chronicle can now record a compensating event: a new event that names the earlier event it offsets, while the original stays exactly as it was.

Added

  • IEventSequence.Compensate(sequenceNumber, event) in the .NET client, backed by a new Compensate operation on the event sequences service. The compensating event is appended to the event source, event stream and subject of the event it compensates for. (part of #3343)
  • CompensationFor on the event context: the sequence number of the compensated event, or null for events that are not compensations. It is stored by the MongoDB, SQL and in-memory providers; existing events and existing SQL tables read as not being compensations, and SQL event sequence tables gain a nullable CompensationFor column when upgraded.
  • A rejected compensation is reported as CompensatedEventNotFound when no event exists at the sequence number, or EventTypeDoesNotCompensateEventType when the event type is not declared with CompensationFor<TEventType> for the type of the target.
  • A Compensate action in the Workbench event sequence view. It is enabled when the selected event's type has registered compensation event types, and opens a form for choosing the type and filling in its content.
  • Documentation for event compensation and compensating events in .NET.

Changed

  • IEventSequence in the Chronicle kernel gains a versioned Compensate method; the existing methods are unchanged, so mixed-version clusters keep working during a rolling upgrade.
  • Clients other than .NET read CompensationFor as 0 for events that are not compensations, because the wire field has no presence. Regenerate the client contracts to see it.