Bird
0
0

A payment system logs duplicate transactions when retrying failed payments. Which design fix will best prevent this issue?

medium📝 Analysis Q14 of 15
LLD - Design — Parking Lot System
A payment system logs duplicate transactions when retrying failed payments. Which design fix will best prevent this issue?
AUse unique transaction IDs and check before recording
BIncrease payment timeout duration
CRemove transaction logging entirely
DAllow multiple retries without checks
Step-by-Step Solution
Solution:
  1. Step 1: Identify cause of duplicate logs

    Retries cause repeated transaction records without uniqueness checks.
  2. Step 2: Implement unique transaction IDs and check

    Assign unique IDs and verify before logging to avoid duplicates.
  3. Final Answer:

    Use unique transaction IDs and check before recording -> Option A
  4. Quick Check:

    Unique IDs prevent duplicate transaction logs [OK]
Quick Trick: Unique IDs stop duplicate transaction records [OK]
Common Mistakes:
MISTAKES
  • Ignoring duplicate checks on retries
  • Removing logging which loses audit trail
  • Increasing timeout doesn't fix duplicates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes