Skip to content

Conversation

petyaslavova
Copy link
Collaborator

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

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.

Copy link
Contributor

@Copilot Copilot AI left a 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.

@petyaslavova petyaslavova merged commit 32d837a into feat/hitless-upgrade-sync-standalone Aug 28, 2025
1 check passed
@petyaslavova petyaslavova deleted the ps_hitless_upgrade_handle_moving_none branch August 28, 2025 15:15
petyaslavova added a commit that referenced this pull request Aug 29, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants