Fixing error handling of connection buffer purging of closed connecton. Enabling troubleshooting logging for maint notifications e2e tests.#3971
Merged
petyaslavova merged 3 commits intomasterfrom Feb 20, 2026
Conversation
…on. Enabling troubleshooting logging for maint notifications e2e tests.
…cneario_runs_repo
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses error handling issues in connection buffer purging when connections are closed concurrently, and enables debug-level logging for maintenance notifications end-to-end tests to improve troubleshooting capabilities.
Changes:
- Fixed AttributeError when purging connection buffer after a connection is closed by another thread during read operation
- Added debug logging for ConnectionError and TimeoutError exceptions in cluster command execution
- Enabled DEBUG level logging for redis.maint_notifications and redis.cluster loggers in maintenance notification tests
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| redis/_parsers/resp3.py | Added try-except block to handle AttributeError when buffer is closed during purge operation, and changed buffer None checks to explicit 'is not None' comparisons |
| redis/cluster.py | Added debug logging when ConnectionError or TimeoutError occurs, including socket address, command arguments, node name, and error details |
| tests/test_scenario/test_maint_notifications.py | Enabled DEBUG level logging for redis.maint_notifications and redis.cluster loggers to facilitate troubleshooting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
@petyaslavova I've opened a new pull request, #3972, to work on those changes. Once the pull request is ready, I'll request review from you. |
* 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>
vladvildanov
approved these changes
Feb 20, 2026
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.
No description provided.