Hacker News new | ask | show | jobs
by strideashort 42 days ago
Probably hybrid is best.

Row level locking and update indeed works, most of the time - bugs are a real issue.

som write ledger and update row in the same transaction.

then in bg have a batch ledger verification, probably on a read replica, and flag any discrepancy.