-
Notifications
You must be signed in to change notification settings - Fork 630
Expose Recovery and Failover Status #1087
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
Conversation
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
d22bcc1 to
9400006
Compare
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 exposes additional recovery and failover status information by introducing new enum values for recovery status and updating related logging and error handling. It also addresses a race condition when acquiring the recovery lock by adding a parameterized StartRecovery method.
- Adds a new RecoveryStatus enum with states for various recovery phases.
- Updates FailoverStatus and its usage in logs and metrics.
- Modifies ReplicationManager, FailoverManager, and other related modules to use the new status values.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/cluster/Server/Replication/RecoveryStatus.cs | Introduces the RecoveryStatus enum with new statuses, including minor comment typos. |
| libs/cluster/Server/Failover/FailoverStatus.cs | Adds new failover statuses and updates the status mapping in GetFailoverStatus. |
| libs/cluster/Server/Replication/ReplicationManager.cs | Updates StartRecovery to accept a RecoveryStatus parameter and logs the status accordingly. |
| libs/cluster/Server/Failover/FailoverManager.cs | Exposes a new lastFailoverStatus field and adds a getter for it. |
| libs/cluster/Server/ClusterProvider.cs | Adds recovery and failover metrics via the updated replication info. |
| libs/cluster/Server/Failover/ReplicaFailoverSession.cs | Updates the call to StartRecovery with a specific RecoveryStatus value and controls the recovery lock release accordingly. |
| libs/cluster/Server/ClusterManagerWorkerState.cs | Modifies the StartRecovery call to use a specific failure recovery status. |
| libs/cluster/Session/ReplicaOfCommand.cs | Adjusts the call to StartRecovery using the appropriate RecoveryStatus. |
c416eb2 to
02525f8
Compare
fa897e7 to
22d30dc
Compare
22d30dc to
011c5ea
Compare
This PR adds two new informational fields related to failover and recovery status.
In addition, fixes a race condition when acquiring the recovery lock.