SpinTheMic
Pro

Interview practice question

Transaction holding locks during an API call

Backend Engineering · Relational Databases · Experienced

A transaction updates an order, then calls a payment API, then commits. Under load, lock waits explode. What is wrong and how do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Long transactions hold locks during slow external calls.
  • Never call external services inside DB transactions.
  • Split into steps with states.
  • Outbox for side effects.
  • Idempotency for retries.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics