Placing an order writes an order row, decrements stock, charges a card through Stripe, and writes a ledger entry. What is in the transaction?

Answer it out loud before you open anything. The value of the flags below is in comparing them to what you actually said.

The situation behind the question

The current handler opens a transaction at the top, does all four steps, and commits at the bottom. It works in staging. In production, under load, the service intermittently exhausts its connection pool.

What it is really testing

Whether the candidate understands that a transaction is a lock-and-connection-holding scope, not a tidy way to group related work. The pool exhaustion in the scenario is the tell: the card charge is inside the transaction, so every in-flight order holds a database connection for the duration of a third party's response time.

Where the mechanism is taught