Rails Daily: Concurrency and Threading Fixes
Twenty pull requests merged focusing on thread safety, connection pool management, and optimistic locking improvements. Key fixes address fiber isolation issues, connection leaks, and lock version handling across Rails components.
Duration: PT2M5S
Transcript
Good morning, this is Rails Daily for May 22nd, 2026.
Yesterday saw significant activity with 20 merged pull requests addressing critical concurrency and stability issues.
Joel Junström merged two major concurrency fixes. First, ShareLock ownership now properly handles fiber isolation, preventing random NoMethodErrors under fiber-scheduled servers like Falcon. Second, ActionDispatch::Executor now releases reloader shares on rack hijack, fixing WebSocket and streaming connection handling in development.
Several database connection and threading issues were resolved. Yasuo Honda merged fixes to prevent PostgreSQL connection leaks in test suites, addressing "too many clients already" failures in CI. Ruy Rocha fixed Active Record Pool Reaper thread leaks after parallelized test runs, preventing accumulation in long-lived CI processes.
Optimistic locking received multiple improvements. Contributor 55728 fixed lock_version resets after nested savepoint rollbacks, while g-pavlik prevented unnecessary lock_version bumps during ActiveStorage blob analysis that were causing StaleObjectError exceptions.
ActiveStorage saw performance enhancements from Mordorreal, who parallelized MirrorService operations and fixed IntegrityError issues with nil checksums. Y-dashev eliminated duplicate where conditions in create_or_find_by queries.
Form helper improvements came from contributor 55728, fixing mismatched label and input IDs when collection values are nil. Andy Jeffries enhanced the rails query command with better safety controls and usability fixes.
Additional merged work included SafeBuffer encoding preservation in MessagePack serialization, permissions policy updates with new web features, and documentation improvements for autoloaders and Active Job backends.
What's next: Watch for continued focus on fiber-aware concurrency patterns and connection pool stability improvements. The team appears to be systematically addressing threading issues across the framework.
That's your Rails Daily update. Stay focused on the code.