GO-V.ORG
As seen in

Compensating transaction

In transaction processing and distributed computing, a compensating transaction is a transaction that reverses the effects of a previously committed transaction.[src] It is a core concept in the saga design pattern, used to maintain data consistency across multiple services or databases in scenarios where traditional ACID transactions are not feasible or practical.[src] A compensating transaction is necessary when a business process, which may consist of several individual transactions, fails after one or more of its steps have already been successfully completed (committed).[src] Unlike a database rollback, which discards uncommitted changes, a compensating transaction is a new transaction that applies business logic to semantically undo the work of a completed transaction, thereby restoring the system to a consistent state.[src]

In transaction processing and distributed computing, a compensating transaction is a transaction that reverses the effects of a previously committed transaction.[src] It is a core concept in the saga design pattern, used to maintain data consistency across multiple services or databases in scenarios where traditional ACID transactions are not feasible or practical.[src] A compensating transaction is necessary when a business process, which may consist of several individual transactions, fails after one or more of its steps have already been successfully completed (committed).[src] Unlike a database rollback, which discards uncommitted changes, a compensating transaction is a new transaction that applies business logic to semantically undo the work of a completed transaction, thereby restoring the system to a consistent state.[src] ===Long-running transactions (Sagas)=== Compensating transactions are fundamental to the saga pattern.[src] A saga is a sequence of local transactions where each transaction updates data within a single service and publishes an event.[src] If a local transaction fails for any reason, the saga executes a series of compensating transactions to revert the changes made by the preceding local transactions.[src] This pattern is essential for processes that are long-lived, such as a trip-booking process that involves coordinating flights, hotels, and car rentals.[src] Because these operations might span a long period and involve multiple independent web services, holding database locks is impractical.[src] Instead, each service commits its transaction and has a compensating transaction ready in case a subsequent step fails.[src] This differs from distributed transactions using the two-phase-commit protocol, as it avoids locking resources for extended durations.[src] ==See also== ACID Business Process Execution Language (BPEL) Two-phase commit protocol ==References==[src]

16 sentences · 16 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Compensating transaction." encyclopegia.org, 2025, https://encyclopegia.org/wiki/compensating-transaction. Accessed 04 December 2026.

Chicago

"Compensating transaction." encyclopegia.org. Accessed December 4, 2026. https://encyclopegia.org/wiki/compensating-transaction.

APA

encyclopegia.org. (2025). Compensating transaction. Retrieved December 4, 2026, from https://encyclopegia.org/wiki/compensating-transaction

Accessed December 4, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1318840851 · 0.5 · snapshot enwiki-001318840851

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.