Repository navigation
Reconnect and retry the Redis length check after a failover - #2961
Merged
MarcusSorealheis merged 5 commits intoOct 20, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
corcillo
reviewed
Oct 19, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
RedisStore::updatewrites its chunks, checks the temp key's length, renames it and sets the TTL. Every step but the length check reconnected on a failover error. When the master died between the chunk writes and that check, the STRLEN waited out the command timeout on the dead connection and the upload failed. On a bed this made every CAS upload fail for about forty seconds after a Redis master kill, and Bazel gave up on its input uploads with "errors during bulk transfer".The length check now re-resolves the master and retries on a retryable error, within the attempt budget the loop already has.
How was this verified?
New test in
redis_store_test.rs: the STRLEN fails once with a timed out IO error, the store reconnects, and the second STRLEN and the RENAME succeed. The existing Redis store tests pass. On the bed a Redis master kill mid-build went from failing the build to a clean failover with no CAS error.Risk
Low: the new branch runs only on a connection-level error that the chunk writes, the rename and the TTL already handle the same way.
AI assistance
An agent drafted the change and I reviewed every line.