Skip to content

Refactoring the SMIGRATED flow - the notification is changed to contain the src node address for each slot range movement.#3925

Merged
petyaslavova merged 5 commits intofeat/hitless_upgrade_sync_cluster_clientfrom
ps_hitless_refactor_smigrated_handling
Feb 9, 2026
Merged

Refactoring the SMIGRATED flow - the notification is changed to contain the src node address for each slot range movement.#3925
petyaslavova merged 5 commits intofeat/hitless_upgrade_sync_cluster_clientfrom
ps_hitless_refactor_smigrated_handling

Conversation

@petyaslavova
Copy link
Collaborator

Description of change

Please provide a description of the change here.

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.

@petyaslavova petyaslavova force-pushed the ps_hitless_refactor_smigrated_handling branch 2 times, most recently from 8f550b6 to a7ec030 Compare January 30, 2026 18:29
…in the src node address for each slot range movement.
Copy link
Contributor

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 pull request refactors the SMIGRATED notification flow to include source node address information for each slot range movement. The key changes involve:

Changes:

  • Modified OSSNodeMigratedNotification to use a list of NodesToSlotsMapping objects containing src_node_address, dest_node_address, and slots
  • Updated notification parsing to handle the new SMIGRATED message format with triplets (src_node, dest_node, slots)
  • Refactored OSSMaintNotificationsHandler to process notifications at cluster level without per-connection handler copies
  • Added __hash__ methods to ClusterNode classes to support set operations
  • Updated tests to reflect new notification format and behavior

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
redis/maint_notifications.py Refactored notification handling to use src node information; removed per-connection handler copies; added NodesToSlotsMapping dataclass; increased SMIGRATED TTL from 30 to 120 seconds
redis/connection.py Updated handler initialization to share OSS cluster handler across connections; added maintenance state reset in disconnect()
redis/_parsers/base.py Updated SMIGRATED message parsing to extract src_node, dest_node, and slots triplets; added dual handler invocation
redis/cluster.py, redis/asyncio/cluster.py Added hash methods to ClusterNode for set operations
tests/test_scenario/test_maint_notifications.py Major test refactoring with new parametrized tests using fault injector effects and triggers
tests/test_scenario/fault_injector_client.py Added get_slot_migrate_triggers method; fixed variable naming; updated send_notification calls
tests/test_scenario/conftest.py Added module-level singleton for fault injector client
tests/maint_notifications/test_maint_notifications.py Updated tests for new NodesToSlotsMapping structure
tests/maint_notifications/test_cluster_maint_notifications_handling.py Updated tests for new SMIGRATED format with src node information
tests/maint_notifications/proxy_server_helpers.py Changed send_notification to broadcast to all connections; updated RESP translation for triplets

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@petyaslavova petyaslavova marked this pull request as ready for review February 4, 2026 08:52
@petyaslavova petyaslavova merged commit 42f0411 into feat/hitless_upgrade_sync_cluster_client Feb 9, 2026
2 checks passed
@petyaslavova petyaslavova deleted the ps_hitless_refactor_smigrated_handling branch February 9, 2026 11:08
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