Questions / Quant development, SQL & data pipelines
A retry includes the allocation decision
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
- The retry rereads capacity: 9 − 5 = 4.
- The old decision to reserve 6 no longer fits.
- 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.