CommandObjects refactoring Part 3: Enforce protocol value and use RESP2 instead of the null value #4515
Merged
Merged
Conversation
Test Results 195 files ± 0 195 suites ±0 9m 34s ⏱️ -28s Results for commit 9006db1. ± Comparison against base commit 49ac82c. This pull request removes 459 tests.This pull request skips 8 tests.♻️ This comment has been updated with latest results. |
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
b0de2e4 to
51b646b
Compare
Contributor
|
many test case impacted; |
51b646b to
2f2d293
Compare
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.
Note
Medium Risk
Touches protocol selection/negotiation paths across
Jedis, pipelines, transactions, and cluster pipeline, which can affect reply decoding and compatibility when protocol is unspecified or negotiation fails. Changes are small but impact core client behavior and are best validated against both RESP2/RESP3 servers.Overview
Enforces a concrete RESP protocol for
CommandObjectsand removes reliance onnullas a protocol sentinel.CommandObjectsnow throws if constructed withnull, and callers (Jedis,Pipeline,Transaction,ReliableTransaction,UnifiedJedis,ClusterPipeline) consistently useRedisProtocol.orServerDefault(...)to fall back to the server default (RESP2) when no protocol is resolved.Updates a few command reply parsers (
hrandfieldWithValues,jsonType) to branch explicitly on RESP2 vs non-RESP2 rather than non-RESP3, and adjusts tests to stop parameterizingCommandObjectstests with anullprotocol.Reviewed by Cursor Bugbot for commit 9006db1. Bugbot is set up for automated code reviews on this repo. Configure here.