~/talk

Rails: Shadow Facets of Concurrency

Talkat Rocky Mountain Ruby 2013 · 2013-09-25..09-27· [ruby-on-rails]
slides:none on file

Shows concrete failure modes in Rails: simple model-level uniq validation allows races so the database can end up with 15 duplicate records under concurrent requests, because each process has its own DB connection and non-atomic checks race. Demonstrates fixes: add a unique index and use transactional locking or retry-on-constraint-error. Shows test that reproduces the bug, describes deployment workarounds (restart or drain during asset compilation) and whether each fix actually prevents duplicates.

AI-written summary · about

  1. 0:00Start
  2. 0:18Building World Class Apps.
  3. 4:00RAILS_ENV=test
  4. 10:25unique.fix :db, diy: true, mysql: true
  5. 22:28deploy shutdown
  6. 26:39Development and Deployment
  7. 32:56Facets #6 - #N. Homewo
  8. 35:29Platinum Sponsor
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.