Fix missing response when AUTH is errored inside a transaction#2287
Merged
Conversation
When we add f8a5a4f, a module auth can add reply in its callback, or not add reply and just return an error robj in its callback, and we have to figure a way to determine whether it has added the reply. Before we are using `clientHasPendingReplies` and it had a issue, the auth might be used inside a transaction or pipeline which already has some pending replies in the client reply list. It causes us to not add the error reply to auth. After valkey-io#1819, now we have a buffered_reply client flag, it indicates the reply for the current command was buffered, either in client::reply or in client::buf. We can use this flag to check. Fixes valkey-io#2106. Signed-off-by: Binbin <binloveplay1314@qq.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #2287 +/- ##
============================================
+ Coverage 71.46% 71.50% +0.03%
============================================
Files 123 123
Lines 66927 66936 +9
============================================
+ Hits 47831 47860 +29
+ Misses 19096 19076 -20
🚀 New features to boost your workflow:
|
ranshid
approved these changes
Jul 1, 2025
ranshid
left a comment
Member
There was a problem hiding this comment.
Generally LGTM. small comment to improve the documentation.
Signed-off-by: Binbin <binloveplay1314@qq.com>
Member
|
@enjoy-binbin will you cherry pick to 8.1? |
enjoy-binbin
added a commit
to enjoy-binbin/valkey
that referenced
this pull request
Jul 2, 2025
…y-io#2287) When we add f8a5a4f, a module auth can add reply in its callback, or not add reply and just return an error robj in its callback, and we have to figure a way to determine whether it has added the reply. Before we are using `clientHasPendingReplies` and it had a issue, the auth might be used inside a transaction or pipeline which already has some pending replies in the client reply list. It causes us to not add the error reply to auth. After valkey-io#1819, now we have a buffered_reply client flag, it indicates the reply for the current command was buffered, either in client::reply or in client::buf. We can use this flag to check. Fixes valkey-io#2106. --------- Signed-off-by: Binbin <binloveplay1314@qq.com>
Member
Author
|
2b19817 I dont know how to handle the projects label, we need a new 8.1.3 project? |
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.
When we add f8a5a4f, a module auth
can add reply in its callback, or not add reply and just return an
error robj in its callback, and we have to figure a way to determine
whether it has added the reply.
Before we are using
clientHasPendingRepliesand it had a issue,the auth might be used inside a transaction or pipeline which already
has some pending replies in the client reply list. It causes us to
not add the error reply to auth.
After #1819, now we have a buffered_reply client flag, it indicates
the reply for the current command was buffered, either in client::reply
or in client::buf. We can use this flag to check.
Fixes #2106.