Compensatory action: How do we end the side effects that have occurred
Multistep tasks may create drafts, register indexes and send notifications at last.
Learning objectives and first steps2 objectives 2 first fixes
Try to do it after reading
- Explaining the action of compensation: mechanisms and prerequisites for ending the side effects that have occurred
- Positioning the mechanism ' s fault limits with fixed examples
Suggested first
- Waiting for a request
- End of Unknown Process
Issues and mechanisms
Multistep tasks may create drafts, register indexes and send notifications at last. When the last step failed, the first two had already developed. The compensatory action is the design of an operationally acceptable repair process for these completed steps; It does not guarantee a precise return to the beginning of the world, nor is it simply equivalent to a rollback of database matters.
The implementation is preceded by a record of the successful return of each step and the corresponding compensation capacity. The order of compensation depends on dependence, usually dealing with the later-step resource, but does not mechanically reverse the positive flow. Compensation itself may also fail, and thus requires markings such as hype, retesting budgets and recoverable progress. Some side effects, such as messages read to an external recipient, cannot be withdrawn, but can only be added to the corrective statement or handed over to manual processing.
A concrete example
The teaching system created drafts and registered search entries for which it was directed. The publication of the check revealed a lack of evidence. Reasonable compensation first withdraws the public visibility of B and then marks it as unpublished for amendment. (a) Direct removal of the A but leaving B, which would result in a defunct entrance; Just changing the “cancelled” in the assistant dialogue will not change the external state. If the withdrawal of B is successful but the update fails, the record of compensation must stop at the second step, rather than claiming its complete closure after repeating the first step again.
Borders and checks
Compensatory interfaces require the same strict authority as the original action and do not give the recovery process unlimited removal capability. To make a prior distinction between attribution of resources, shared references and retention requirements in order to avoid undermining other mandates when restoring current mandates. Retrievable draft processes can be automatically closed, and where irreversible issuances or fund movements are involved, implementation boundaries should be determined by a specific business authorization strategy.
A method of verification
In particular, shared resources cannot be deleted unconditionally: if the draft has been quoted in another report, compensation may remove the connection or the marking of the current task and then be handled by the entity with a retention strategy. The objective of the compensation is to restore a consistent and accountable state of operations, not to erase all traces.
Check understanding
Does the success of the compensation mean that the original action has never been carried out?
No, it's not. Both the original exercise and the compensation were true, the audit tracks should be retained and the external observers might have seen the middle state.
Can you just delete the task log after the compensation fails?
Can't. There was a need to retain the steps, not the steps, not the return and the next recovery entrance, without which there would be a loss of interpretation of the external situation.
Sources and reconciliations
Definitions, methods and interfaces are available.
- Microsoft Azure Architecture — Compensating Transaction
- AWS Builders Library — Making retries safe with idempotent APIs
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.