Transactions and consistency

What should happen to the source change?

Examples

Worked example

Input
The source count changes. The destination update then fails before commit.
Expected output
It should roll back.

Hints and solution

Hint 1

Write down the starting state and walk through one example by hand.

Reveal worked answer

Both changes belong to the same transaction, so aborting it cancels the uncommitted source update.

Back to the lesson