Skip to content

Conversation

@petyaslavova
Copy link
Collaborator

@petyaslavova petyaslavova commented Nov 17, 2025

In this PR the following changes are introduced:

  • OSS Notification Classes: New OSSNodeMigratingNotification and OSSNodeMigratedNotification classes that track slot migration events with source/destination nodes and affected slots

  • Thread-Safe Handler: OSSMaintNotificationsHandler provides thread-safe management of maintenance notifications with automatic expiration cleanup

  • Parser Integration: Seamless integration with existing parser infrastructure to recognize and route OSS maintenance notifications

  • Testing: Full unit test coverage for all notification classes ensuring proper behavior across initialization, equality, hashing, and collection operations

  • Out of scope for the current PR: initializing the nodes manager handler that will react on SMIGRATED notifications.

@petyaslavova petyaslavova force-pushed the ps_add_cluster_related_notifications_and_handlers branch from b7bf8e3 to a983c20 Compare November 18, 2025 16:43
…ceholder for smigrated handler in OSSMaintNotificationsHandler class
@petyaslavova petyaslavova force-pushed the ps_add_cluster_related_notifications_and_handlers branch from a983c20 to e3c8b3f Compare November 19, 2025 09:14
@petyaslavova petyaslavova marked this pull request as ready for review November 19, 2025 09:20
@petyaslavova petyaslavova changed the title Adding handlers for SMIGRATING and SMIGRATED(just placeholder for now) Adding OSS Notification Classes for SMIGRATING and SMIGRATED. Handling of SMIGRATING is completed and covered with tests. Nov 19, 2025
@petyaslavova petyaslavova requested a review from Copilot November 19, 2025 09:28
Copilot finished reviewing on behalf of petyaslavova November 19, 2025 09:33
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 PR introduces OSS (Open Source Software) cluster maintenance notification support for handling slot migration events in Redis. The implementation adds two new notification classes (OSSNodeMigratingNotification and OSSNodeMigratedNotification) along with parser integration and comprehensive unit tests for the notification classes themselves.

  • New notification classes to track slot migration with source/destination nodes and affected slots
  • Thread-safe OSSMaintNotificationsHandler for managing maintenance notifications with expiration cleanup
  • Parser integration to recognize and route OSS maintenance notifications (SMIGRATING and SMIGRATED messages)
  • Full unit test coverage for notification class behavior (initialization, equality, hashing, collections)

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
redis/maint_notifications.py Adds OSSNodeMigratingNotification, OSSNodeMigratedNotification classes and OSSMaintNotificationsHandler for managing OSS slot migration notifications
redis/_parsers/base.py Adds parsing logic for SMIGRATING/SMIGRATED messages and integrates OSS notification handlers into push notification routing
redis/_parsers/resp3.py Adds oss_cluster_maint_push_handler_func attribute to support OSS maintenance notification handling
redis/_parsers/hiredis.py Adds oss_cluster_maint_push_handler_func attribute to support OSS maintenance notification handling
tests/maint_notifications/test_maint_notifications.py Comprehensive unit tests for OSSNodeMigratingNotification and OSSNodeMigratedNotification classes
tests/maint_notifications/test_cluster_maint_notifications_handling.py Integration test for SMIGRATING notification handling and test infrastructure refactoring
tests/maint_notifications/proxy_server_helpers.py Helper functions for RESP format conversion and HTTP client response handling improvements

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

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