-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Hitless upgrade support implementation for synchronous Redis client. #3713
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: master
Are you sure you want to change the base?
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.
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 hitless upgrade support for the synchronous Redis client by implementing maintenance event handling and extending the connection and parser layers to react to MOVING, MIGRATING, and MIGRATED push messages.
- Introduce a new
MaintenanceEventsConfig
, connection and pool handlers to manage maintenance event lifecycles. - Update the
Connection
,ConnectionPool
, andRedis
client to wire up maintenance event handlers when RESP3 is used. - Add extensive unit and integration tests covering event parsing, pool behavior, and client operations during node maintenance.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
tests/test_maintenance_events_handling.py | New integration tests for MOVING/MIGRATING/MIGRATED event handling |
tests/test_maintenance_events.py | Unit tests for MaintenanceEvent* classes and pool/connection handlers |
tests/test_connection_pool.py | Add should_reconnect stub for pool tests |
redis/retry.py | Log a warning on each retry attempt |
redis/maintenance_events.py | Core implementation of maintenance event parsing and pool handler |
redis/connection.py | Extend AbstractConnection to support maintenance events |
redis/client.py | Wire maintenance event config into Redis client |
redis/_parsers/resp3.py | Hook maintenance push handlers into RESP3 parser |
redis/_parsers/hiredis.py | Hook maintenance push handlers into Hiredis parser |
redis/_parsers/base.py | Define maintenance message types and dispatch to handlers |
redis/asyncio/connection.py | Add maintenance lock scope to asyncio pool |
Comments suppressed due to low confidence (1)
redis/_parsers/resp3.py:209
- Using a hardcoded
id
for all MOVING notifications can cause event collisions and prevent correct deduplication; consider parsing a unique ID from the server message or incrementing per‐event.
# bulk response
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
Hitless upgrade support implementation for synchronous Redis client.