Rails Daily: Redis Migration and Composite Key Fixes
Rails is migrating its Redis infrastructure to the redis-client library while fixing multiple bugs around composite primary keys and data handling. The changes improve performance and resolve several edge cases that could cause data loss or unexpected behavior.
Duration: PT2M12S
Transcript
Good morning, it's June 2nd, 2026. Yesterday saw a significant infrastructure shift in Rails alongside critical bug fixes for composite primary keys.
The biggest change is Rails' migration from the redis gem to redis-client. This affects both Active Support's Redis Cache Store in PR 57004 and Action Cable's Redis adapter in PR 57533. The new redis-client library is lighter weight and offers a cleaner subscription API. To ease the transition, the old Redis Cache Store has been renamed to Deprecated Redis Cache Store, allowing apps to migrate gradually.
A cluster of fixes addressed serious composite primary key issues. PR 57530 fixed find operations silently returning empty arrays when composite key components were passed as strings - the format they take from request parameters or JSON. PR 57531 resolved a similar problem with collection ID writers raising record not found errors for existing records. These weren't just API inconsistencies - they could cause data to silently disappear without raising exceptions, making them particularly dangerous.
Several PostgreSQL-specific issues were resolved. PR 57515 fixed range bounds parsing when comma-containing values got corrupted during text parsing. PR 57439 addressed schema dumps producing invalid Ruby code for range columns. PR 57514 corrected Action Cable's channel identifier hashing, which was measuring character count instead of byte size for the 63-byte PostgreSQL limit.
Additional reliability improvements include better error handling for malformed cache payloads in PR 57502 and fixing Duration methods that were truncating sub-second precision in PR 57516.
These changes primarily affect apps using Redis, composite primary keys, or PostgreSQL ranges. The Redis migration will require updating dependencies, while the composite key fixes eliminate silent failures that could have been corrupting application logic.
That's your Rails update for today.