-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Hitless-Upgrade: Add handling of MOVING push notification with "null" host:port info. #3751
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
Hitless-Upgrade: Add handling of MOVING push notification with "null" host:port info. #3751
Conversation
…o connection moving info to be able to handle properly connections on Moved.
…th relax timeout enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for handling MOVING push notifications that contain "null" host:port information instead of actual host and port values. The key changes implement a delayed reconnection strategy where the client waits for half the TTL before triggering reconnects to the originally configured host address.
- Added handling for MOVING events with null host/port values
- Implemented delayed reconnection logic using threading.Timer
- Enhanced connection pool update mechanisms with event hash tracking
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tests/test_maintenance_events_handling.py |
Added comprehensive test coverage for null MOVING events and enhanced existing test validation |
tests/test_maintenance_events.py |
Added unit test for MOVING events with null host/port values |
redis/maintenance_events.py |
Implemented core logic for handling null MOVING events with delayed reconnection |
redis/connection.py |
Enhanced connection pool management with event hash tracking and simplified reconnection methods |
redis/_parsers/base.py |
Added parser support for null host/port values in MOVING notifications |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
32d837a
into
feat/hitless-upgrade-sync-standalone
…rade or maintenance procedures. (#3756) * Hitless upgrade: Support initial implementation for synchronous Redis client - no handshake, no failing over notifications support. (#3713) * Adding handling of FAILING_OVER and FAILED_OVER events/push notifications (#3716) * Hitless upgrade: Adding handshake command to enable the notifications after connection is established (#3735) * Hitless-Upgrade: Add handling of MOVING push notification with "null" host:port info. (#3751) --------- Co-authored-by: Elena Kolevska <[email protected]>
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Adding handling for the cases when push notification doesn't contain new host and port pair - it just contains "null" txt.
For this case we are not supposed to reconnect immediately - we should wait half of the ttl in the notification and then trigger reconnects to the originally set host address.