-
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. #3738
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
base: feat/hitless-upgrade-sync-standalone
Are you sure you want to change the base?
Hitless-Upgrade: Add handling of MOVING push notification with "null" host:port info. #3738
Conversation
… tests for maintenance_events.py file
…tion pool - this should be a separate PR
… Refactored the maintenance events tests not to be multithreaded - we don't need it for those tests.
…ot processed in in Moving state. Tests are updated
…ply them during connect
Signed-off-by: Elena Kolevska <[email protected]> Cleanup Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
…isting ones more generic
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
…actConnection class
…e better retry_on_error handling on connection initialization.
8d7cc00
to
10ded34
Compare
…o connection moving info to be able to handle properly connections on Moved.
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, which occurs when Redis doesn't provide specific node address details during cluster maintenance operations.
Key Changes
- Modified
NodeMovingEvent
to acceptNone
values for host and port parameters - Updated parser logic to handle "null" values in MOVING push notifications
- Enhanced maintenance event handling to process events without specific destination addresses
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 |
---|---|
redis/maintenance_events.py |
Updated NodeMovingEvent constructor to accept optional host/port and modified hash calculation |
redis/_parsers/base.py |
Added parsing logic to handle "null" host:port values in MOVING notifications |
redis/connection.py |
Enhanced connection pool methods to support event hash tracking and conditional host updates |
tests/test_maintenance_events.py |
Added test cases for events with None host/port values |
tests/test_maintenance_events_handling.py |
Added comprehensive integration test for null MOVING events and updated existing tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Please provide a description of the change here.