Fix race condition in RESP3 parser buffer purge#3972
Merged
petyaslavova merged 2 commits intops_integrate_hitless_scenario_tests_with_scneario_runs_repofrom Feb 20, 2026
Merged
Conversation
…condition Co-authored-by: petyaslavova <194077574+petyaslavova@users.noreply.github.com>
❌ Jit Scanner failed - Our team is investigatingJit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions. 💡 Need to bypass this check? Comment |
Copilot
AI
changed the title
[WIP] WIP address feedback on error handling and logging improvements
Fix race condition in RESP3 parser buffer purge
Feb 20, 2026
petyaslavova
approved these changes
Feb 20, 2026
Collaborator
|
@sera bypass |
fbf69d8
into
ps_integrate_hitless_scenario_tests_with_scneario_runs_repo
2 checks passed
petyaslavova
added a commit
that referenced
this pull request
Feb 20, 2026
…n. Enabling troubleshooting logging for maint notifications e2e tests. (#3971) * Fixing error handling of connection buffer purging of closed connection. Enabling troubleshooting logging for maint notifications e2e tests. * Fix race condition in RESP3 parser buffer purge (#3972) * Initial plan * Combine None check with try-except for buffer.purge() to handle race condition Co-authored-by: petyaslavova <194077574+petyaslavova@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: petyaslavova <194077574+petyaslavova@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: petyaslavova <194077574+petyaslavova@users.noreply.github.com>
petyaslavova
added a commit
that referenced
this pull request
Feb 25, 2026
…n. Enabling troubleshooting logging for maint notifications e2e tests. (#3971) * Fixing error handling of connection buffer purging of closed connection. Enabling troubleshooting logging for maint notifications e2e tests. * Fix race condition in RESP3 parser buffer purge (#3972) * Initial plan * Combine None check with try-except for buffer.purge() to handle race condition Co-authored-by: petyaslavova <194077574+petyaslavova@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: petyaslavova <194077574+petyaslavova@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: petyaslavova <194077574+petyaslavova@users.noreply.github.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.
self._buffercan be set toNoneby another thread between the None check and thepurge()call, causing an unhandledAttributeErrorin theelsebranch ofread_response.Changes
redis/_parsers/resp3.py: Combine theself._buffer is not Noneguard with atry/except AttributeErrorto handle the TOCTOU race condition — consistent with the existing pattern on lines 32 and 38:💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.