Fix command queue corruption on encoding failures (#3443) (7.0.x)#3561
Merged
a-TODO-rov merged 1 commit intoredis:7.0.xfrom Dec 15, 2025
Merged
Fix command queue corruption on encoding failures (#3443) (7.0.x)#3561a-TODO-rov merged 1 commit intoredis:7.0.xfrom
a-TODO-rov merged 1 commit intoredis:7.0.xfrom
Conversation
* Correctly handling the encoding error for Lettuce [POC] Summary: Add encoding error tracking to prevent command queue corruption - Add markEncodingError() and hasEncodingError() methods to RedisCommand interface - Implement encoding error flag in Command class with volatile boolean - Mark commands with encoding errors in CommandEncoder on encode failures - Add lazy cleanup of encoding failures in CommandHandler response processing - Update all RedisCommand implementations to support encoding error tracking - Add comprehensive unit tests and integration tests for encoding error handling Fixes issue where encoding failures could corrupt the outstanding command queue by leaving failed commands in the stack without proper cleanup, causing responses to be matched to wrong commands. Test Plan: UTs, Integration testing Reviewers: yayang, ureview Reviewed By: yayang Tags: #has_java JIRA Issues: REDIS-14050 Differential Revision: https://code.uberinternal.com/D19068147 * Fix error command handling code logic and add integration test for encoding failure Summary: Fix error command handling code logic and add integration test for encoding failure Test Plan: unittest, integration test Reviewers: #ldap_storage_sre_cache, ureview, jingzhao Reviewed By: #ldap_storage_sre_cache, jingzhao Tags: #has_java JIRA Issues: REDIS-14192 Differential Revision: https://code.uberinternal.com/D19271701 * latest changes * Addressing the reactive streams issue * Addressing the encoding issues Addressing some general cases * Formatting issues * Test failures addressed * Polishing --------- Co-authored-by: Jing Zhao <jingzhao@uber.com> Co-authored-by: Tihomir Mateev <tihomir.mateev@gmail.com>
a-TODO-rov
pushed a commit
that referenced
this pull request
Dec 15, 2025
* Correctly handling the encoding error for Lettuce [POC] Summary: Add encoding error tracking to prevent command queue corruption - Add markEncodingError() and hasEncodingError() methods to RedisCommand interface - Implement encoding error flag in Command class with volatile boolean - Mark commands with encoding errors in CommandEncoder on encode failures - Add lazy cleanup of encoding failures in CommandHandler response processing - Update all RedisCommand implementations to support encoding error tracking - Add comprehensive unit tests and integration tests for encoding error handling Fixes issue where encoding failures could corrupt the outstanding command queue by leaving failed commands in the stack without proper cleanup, causing responses to be matched to wrong commands. Test Plan: UTs, Integration testing Reviewers: yayang, ureview Reviewed By: yayang Tags: #has_java JIRA Issues: REDIS-14050 Differential Revision: https://code.uberinternal.com/D19068147 * Fix error command handling code logic and add integration test for encoding failure Summary: Fix error command handling code logic and add integration test for encoding failure Test Plan: unittest, integration test Reviewers: #ldap_storage_sre_cache, ureview, jingzhao Reviewed By: #ldap_storage_sre_cache, jingzhao Tags: #has_java JIRA Issues: REDIS-14192 Differential Revision: https://code.uberinternal.com/D19271701 * latest changes * Addressing the reactive streams issue * Addressing the encoding issues Addressing some general cases * Formatting issues * Test failures addressed * Polishing --------- Co-authored-by: yang <43356004+yangy0000@users.noreply.github.com> Co-authored-by: Jing Zhao <jingzhao@uber.com>
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.
Cross-porting #3443 from the integration branch
Make sure that:
mvn formatter:formattarget. Don’t submit any formatting related changes.