Questions / Quant development, SQL & data pipelines

A retry includes the allocation decision

Challenge, about 10 minutes. Question D339.

Capacity was 9. While this transaction failed, another committed a reservation of 5. After restarting and rereading, what is the largest reservation this transaction can make?

Answer it in the app It's free. You get hints, a second try if you miss, and a follow-up question.

Show the answer and worked solution

Answer: 4 units

  1. The retry rereads capacity: 9 − 5 = 4.
  2. The old decision to reserve 6 no longer fits.
  3. At most 4 can be reserved.

Interview shortcut. Reread: 9 − 5 = 4.

Takeaway. Retry the whole transaction from the read.

In the app this has a follow-up where one thing about the setup changes. Try the follow-up.

More sql & data pipelines questions