📝Daily

Day 23

Tony Duong

Tony Duong

Apr 15, 20261 min

Also available in:🇫🇷🇯🇵
#engineering#rails#concurrency#mysql#rspec
Day 23

Today, I:

  • wrote Lost Updates in a Rails App: What Broke, How We Fixed It, and How We Tested It about the lost update problem I encountered while fixing a bug in spacely_web that had been unsolved for years — covered what a lost update is, why MySQL InnoDB's REPEATABLE READ doesn't save you from read-modify-write on a JSON column, how two parallel jobs each merging a different key into WorkflowRun#progress end up dropping one key, the with_lock fix we shipped, and a threaded RSpec setup using two Queues to reproduce the race and show failing vs passing output
Tony Duong

By Tony Duong

A digital diary. Thoughts, experiences, and reflections.