Hi, it’s Vipul. Happy Friday 🎃!
Let’s explore this week’s changes in the Rails codebase.
Let’s explore this week’s changes in the Rails codebase.
New Guides Pull Request for review
A new guides Pull Request is up, which updates the Active Record Encryption Guide. If you are well-versed in these areas, please review and submit your feedback on the PR!
We also have 2 other Guides PRs open where you can help out!
- Update Threading and Code Execution Guide
- Move and merge PostgreSQL Guide into the API and other guides
Fix affected_rows for SQLite adapter
This update refines the SQLite adapter’s affected_rows logic. It addresses two issues: #changes wasn’t reset for non-mutating queries like SELECT, while #total_changes could overcount due to including cascading deletes. The new approach uses #total_changes to detect whether any rows were affected and #changes to return the most accurate count.
Add ability to change the transaction isolation for all pools within a block
This change introduces a new method, ActiveRecord.with_transaction_isolation_level, which allows temporarily changing the transaction isolation level for all database pools accessed within a block. This simplifies handling multiple databases or shards by avoiding the need to loop through each pool individually, improving performance and easing transaction management.
Active Job Continuations improvements
This PR improves Active Job’s continuation system by adding runtime instrumentation for each step, introducing configurable job resumption options, preventing checkpoints inside database transactions, adjusting checkpoint timing to before each step, and ensuring errors are raised if step order changes when resuming.
You can view the whole list of changes here.
We had 8 contributors to the Rails codebase this past week!
Until next time!