Repository navigation
Release v19.125.0
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 newCompensateoperation 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)CompensationForon the event context: the sequence number of the compensated event, ornullfor 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 nullableCompensationForcolumn when upgraded.- A rejected compensation is reported as
CompensatedEventNotFoundwhen no event exists at the sequence number, orEventTypeDoesNotCompensateEventTypewhen the event type is not declared withCompensationFor<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
IEventSequencein the Chronicle kernel gains a versionedCompensatemethod; the existing methods are unchanged, so mixed-version clusters keep working during a rolling upgrade.- Clients other than .NET read
CompensationForas0for events that are not compensations, because the wire field has no presence. Regenerate the client contracts to see it.