Repository navigation
Preserve indeterminate Redis outcomes across transport failures - #1462
Conversation
|
@codex review |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7319681481
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return true | ||
| } | ||
| } | ||
| return false |
There was a problem hiding this comment.
Preserve recognition of explicit NOTLEADER replies over RESP
When a proxied EXEC target rejects the transaction with NOTLEADER leader not found, go-redis decodes that reply into a Redis error without any Go sentinel identity. Removing the suffix fallback makes both handleProxyTxnError and handleProxyTxnCommandError ignore this terminal rejection, so proxyTransactionToLeaderAddr falls through to writing an EXEC result array containing the copied error for every queued command. This changes a rejected transaction into an apparently executed transaction with per-command failures and prevents clients from handling the top-level rejection correctly. Recognize the explicit RESP NOTLEADER error code separately from arbitrary error-text suffixes, and cover this path with a decoded Redis error rather than a typed gRPC status.
Useful? React with 👍 / 👎.
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
7319681 to
9ea9aff
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ea9aff9e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| isRedisNotLeaderReply(err) || | ||
| errors.Is(err, raftengine.ErrLeadershipLost) || | ||
| isRedisTransportUncertain(err) |
There was a problem hiding this comment.
Preserve decoded unknown outcomes as top-level EXEC errors
When EXEC is forwarded through a server without requestAdmission (as configured in cmd/server/demo.go), the target now converts leadership-loss and gRPC failures into ERR operation outcome unknown. After go-redis decodes that RESP reply, it has neither the original sentinel nor a transport-error type, so both terminal-error checks ignore it and proxyTransactionToLeaderAddr writes an array containing the copied error for each queued command. Previously, the leadership failures recognized by the suffix fallback remained top-level rejections. This makes an indeterminate transaction look like an executed transaction with individual command failures. Apply the existing isProxyTransactionOutcomeUnknown recognition outside the admission-only path and preserve the fixed top-level unknown reply.
Useful? React with 👍 / 👎.
Signed-off-by: bootjp <contact@bootjp.me>
9ea9aff to
adeb35a
Compare
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Behavior
Risk
Some previously retryable NOTLEADER replies now become explicit unknown outcomes when the request may have been submitted. This is conservative; clients must resolve or avoid replaying non-idempotent operations.
Verification
Summary by CodeRabbit