CSE Roadmap

Common tier · about 2 hours · 5 parts

Part 2 of 5 · 1 min read

Transaction failure

A single transaction cannot continue, while the rest of the system keeps running normally.

Think of one specific customer's order being canceled mid-checkout, due to an error on that one order alone, while every other checkout in the store continues completely unaffected.

In plain words: a transaction failure happens when a single transaction cannot complete, due to something like a violated constraint, a detected deadlock as covered in Level 7, or an explicit application-issued rollback, while the rest of the system, including every other concurrently running transaction, continues operating normally. Recovering from a transaction failure means undoing just that one transaction's own changes, exactly the atomicity guarantee covered in Level 7, without affecting anything else at all.

A worked example. A transaction violating a CHECK constraint partway through is rolled back on its own; every other transaction running concurrently against the same database is completely unaffected.

The key lines. No new SQL; a transaction failure is handled automatically by the same rollback mechanism covered in Level 7's atomicity material.

Transaction failure

A transaction failure is the inability of a single transaction to complete, due to a constraint violation, deadlock, or explicit rollback, while the rest of the system continues running normally.

Example: one customer's order being canceled mid-checkout due to an error specific to that order, with every other checkout continuing unaffected, is a transaction failure.