Database Bug Hunts: 51 Debugging Challenges
51 database bug hunts — 10 easy · 32 medium · 9 hard — each a small project with a planted bug, a bug report and hidden tests that decide whether the fix is…
- Hunts: 51
- By difficulty: 10 easy · 32 medium · 9 hard
- Reward: 50 XP per complete fix
Bugs in the data layer: ghost rows in an audit log, a WHERE clause that vanishes, a cache stampede, an N+1 query storm, a connection never released, keyset pagination without a tiebreak, a batch half applied. The code that talks to the database is what you edit; the tests read what it wrote.
Every database bug hunt
- IN () Means Nothing Easy · JavaScript · SQL · Edge Cases
- Read Your Own Writes Easy · Java · Replication · Consistency
- Refunds for Money Never Taken Easy · JavaScript · Money · Validation
- The Backup That Always Said Yes Easy · Python · Reliability · Validation
- The Cache Key With a Twist Easy · JavaScript · Caching · Canonicalization
- The Dividend Paid in Ghost Shares Easy · JavaScript · Money · Validation
- The Ledger That Leaked Cents Easy · Python · Floating Point · Money
- The Runaway Retry Easy · Python · Retries · Backoff
- The Upsert That Forgot to Add Easy · Java · Upserts · Counters
- Two Billion Events and One More Easy · Java · Overflow · SQL
- Both Halves Thought They Were Primary Hard · JavaScript · Consensus · Split Brain
- Cache Stampede at Dawn Hard · JavaScript
- Keyset Without a Tiebreak Hard · JavaScript · Pagination · Ordering
- One Shard Took Every New User Hard · JavaScript · Sharding · Scaling
- The Clock That Ran Backwards Hard · Java · IDs · Clocks
- The Fsync That Lied on Retry Hard · Python · Retries · State
- The Gift Card Paid Twice Hard · JavaScript · Concurrency · Money
- The Player That Wore Out Disks Hard · JavaScript · Caching · Limits
- Two Billion Transactions Later Hard · Java · Overflow · Time
- Access Denied at Midnight Medium · JavaScript
- Escaping the Wildcard Medium · Java · SQL · Escaping
- Half an Emoji in the Username Medium · Python · Unicode · Encoding
- Listening Everywhere, Asking Nothing Medium · JavaScript · Security · Config
- NULL Isn't Equal to NULL Medium · Python · SQL · NULL Semantics
- Readable Passwords at Rest Medium · JavaScript · Security · Hashing
- Release the Connection! Medium · JavaScript · Connection Pool · Error Handling
- Satoshis, Not Doubles Medium · Java · Floating Point · Money
- Sold Out, Sold Again Medium · JavaScript · Inventory · Check-Then-Act
- Somebody Else's Videos in My Takeout Medium · JavaScript · Concurrency · State
- Someone Else's Bank Account Medium · JavaScript · Migration · Identifiers
- The Backup That Backed Up Nothing Medium · Python · Backups · Validation
- The Backup That Deleted the Primary Medium · JavaScript · Replication · State
- The Cleanup Job That Ran Against Production Medium · Python · Access · Config
- The Cleanup That Deleted the Customers Medium · JavaScript · Data Loss · Identifiers
- The Cursor at the End of Time Medium · Python · Pagination · Parsing
- The Files Deleted Years Ago Came Back Medium · JavaScript · Data · Sync
- The Half-Applied Batch Medium · Python · Transactions · Atomicity
- The Hashes Without Salt Medium · Python · Security · Hashing
- The Login Key Made of Passwords Medium · JavaScript · Security · Auth
- The Loss That Lost Its Minus Sign Medium · Python · Money · Accounting
- The Migration That Unblocked Everyone Medium · Python · Security · State
- The N+1 Query Storm Medium · JavaScript · ORM · Performance
- The Negative Shard Medium · Java · Hashing · Overflow
- The Optimistic Lock That Wasn't Medium · Python · Concurrency · Versioning
- The Phantom WHERE Clause Medium · JavaScript
- The Rotation That Ate the Backups Medium · JavaScript · Backups · Retention
- The Script That Granted Everyone Everything Medium · JavaScript · Permissions · Scoping
- The Spreadsheet That Ran Out of Rows Medium · Python · Limits · Validation
- The Two-Terabyte Wall Medium · JavaScript · Limits · Storage
- Three Presses, Three Remittances Medium · Python · Idempotency · Money
- Wildcards for Every Account Medium · JavaScript · Security · Auth