-
Notifications
You must be signed in to change notification settings - Fork 1.2k
rangeWithScores
methods returning not null in transactions
#3225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
LeeHyungGeol
wants to merge
3
commits into
spring-projects:main
from
LeeHyungGeol:fix/rangeWithScores-unknown-command-in-transaction
Closed
rangeWithScores
methods returning not null in transactions
#3225
LeeHyungGeol
wants to merge
3
commits into
spring-projects:main
from
LeeHyungGeol:fix/rangeWithScores-unknown-command-in-transaction
Conversation
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
8db154f
to
7022c14
Compare
…ANGEWITHSCORES, ZRANGEBYSCOREWITHSCORES, ZREVRANGEWITHSCORES, ZREVRANGEBYSCOREWITHSCORES Signed-off-by: LeeHyungGeol <rjf1138@naver.com>
…dd author tags in the class header Signed-off-by: LeeHyungGeol <rjf1138@naver.com>
7022c14
to
8b5b266
Compare
…methods Signed-off-by: LeeHyungGeol <rjf1138@naver.com>
onobc
pushed a commit
that referenced
this pull request
Sep 30, 2025
The rangeWithScores family of methods (zRangeWithScores, zRangeByScoreWithScores, zRevRangeWithScores, zRevRangeByScoreWithScores) were missing from the RedisCommand enumeration, causing ConnectionSplittingInterceptor to resolve them as UNKNOWN commands. This resulted in read-only methods being incorrectly queued in MULTI/EXEC blocks instead of executing immediately on separate connections, causing them to return null in transactional contexts. This commit adds the ZRANGEWITHSCORES, ZRANGEBYSCOREWITHSCORES, ZREVRANGEWITHSCORES, ZREVRANGEBYSCOREWITHSCORES enum entries to RedisCommand.java as well as adds a regression test in TransactionalStringRedisTemplateTests.java. The fix ensures these read-only methods are properly recognized and execute immediately in transactional contexts. Original Pull Request: #3225 Fixes: #3187 Signed-off-by: LeeHyungGeol <rjf1138@naver.com>
Thank you @LeeHyungGeol for the excellent contribution! I added a tiny polish commit to refactor out the verification method in the regression test (here). Closing in favor of 96f250d |
onobc
added a commit
that referenced
this pull request
Sep 30, 2025
…hods" Adds convenience method to verify results in the newly added regression test in the previous commit. Also removes a few warnings in the regression test by suppressing 'rawtypes' and 'unchecked' usages. Original Pull Request: #3225 Related tickets: #3187 Signed-off-by: onobc <chris.bono@gmail.com>
onobc
added a commit
that referenced
this pull request
Sep 30, 2025
The rangeWithScores family of methods (zRangeWithScores, zRangeByScoreWithScores, zRevRangeWithScores, zRevRangeByScoreWithScores) were missing from the RedisCommand enumeration, causing ConnectionSplittingInterceptor to resolve them as UNKNOWN commands. This resulted in read-only methods being incorrectly queued in MULTI/EXEC blocks instead of executing immediately on separate connections, causing them to return null in transactional contexts. This commit adds the ZRANGEWITHSCORES, ZRANGEBYSCOREWITHSCORES, ZREVRANGEWITHSCORES, ZREVRANGEBYSCOREWITHSCORES enum entries to RedisCommand.java. The fix ensures these read-only methods are properly recognized and execute immediately in transactional contexts. Original Pull Request: #3225 Fixes: #3187 Signed-off-by: LeeHyungGeol <rjf1138@naver.com> (cherry picked from commit 96f250d) Signed-off-by: Chris Bono <chris.bono@broadcom.com>
onobc
added a commit
that referenced
this pull request
Sep 30, 2025
The rangeWithScores family of methods (zRangeWithScores, zRangeByScoreWithScores, zRevRangeWithScores, zRevRangeByScoreWithScores) were missing from the RedisCommand enumeration, causing ConnectionSplittingInterceptor to resolve them as UNKNOWN commands. This resulted in read-only methods being incorrectly queued in MULTI/EXEC blocks instead of executing immediately on separate connections, causing them to return null in transactional contexts. This commit adds the ZRANGEWITHSCORES, ZRANGEBYSCOREWITHSCORES, ZREVRANGEWITHSCORES, ZREVRANGEBYSCOREWITHSCORES enum entries to RedisCommand.java. The fix ensures these read-only methods are properly recognized and execute immediately in transactional contexts. Original Pull Request: #3225 Fixes: #3187 Signed-off-by: LeeHyungGeol <rjf1138@naver.com> (cherry picked from commit 96f250d) Signed-off-by: Chris Bono <chris.bono@broadcom.com>
onobc
added a commit
that referenced
this pull request
Sep 30, 2025
…hods" Adds convenience method to verify results in the newly added regression test in the previous commit. Also removes a few warnings in the regression test by suppressing 'rawtypes' and 'unchecked' usages. Original Pull Request: #3225 Related tickets: #3187 Signed-off-by: Chris Bono <chris.bono@broadcom.com>
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.
Fix. #3187
Summary
Add missing RedisCommand enum entries for ZSet WithScores methods.
The rangeWithScores family of methods (
zRangeWithScores
,zRangeByScoreWithScores
,zRevRangeWithScores
,zRevRangeByScoreWithScores
) were missing from the RedisCommand enumeration, causing ConnectionSplittingInterceptor to resolve them as UNKNOWN commands.This resulted in read-only methods being incorrectly queued in MULTI/EXEC blocks instead of executing immediately on separate connections, causing them to return null in transactional contexts.
Changes:
ZRANGEWITHSCORES
,ZRANGEBYSCOREWITHSCORES
,ZREVRANGEWITHSCORES
,ZREVRANGEBYSCOREWITHSCORES
enum entries in RedisCommand.javaThe fix ensures these read-only methods are properly recognized and execute
immediately in transactional contexts.