K8SPS-69 | Readiness probe should check for async replication status#1270
Open
mayankshah1607 wants to merge 6 commits intomainfrom
Open
K8SPS-69 | Readiness probe should check for async replication status#1270mayankshah1607 wants to merge 6 commits intomainfrom
mayankshah1607 wants to merge 6 commits intomainfrom
Conversation
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the async-cluster readiness logic so the healthcheck can detect when asynchronous replication exists but is stopped, rather than only inferring replica state from read_only.
Changes:
- Introduce
ReplicationStatusStoppedto explicitly represent configured-but-not-running async replication. - Update async readiness probe to use
ReplicationStatus()and fail when replication is stopped. - Update async bootstrap to (re)configure replication when status is
NotInitiatedorStopped.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/db/replication.go | Adds ReplicationStatusStopped and returns it when replication is present but not ON. |
| cmd/internal/db/db.go | Returns ReplicationStatusStopped when IO/SQL threads aren’t ON (no error). |
| cmd/healthcheck/main.go | Readiness for async clusters now checks replication status and fails if stopped. |
| cmd/bootstrap/async/async_replication.go | Treats Stopped the same as NotInitiated to trigger replication configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
egegunes
approved these changes
Apr 3, 2026
hors
approved these changes
Apr 3, 2026
Collaborator
commit: 71d3cd6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGE DESCRIPTION
Problem:
An async replica with stopped replication is not marked as unready.
Cause:
We do not have the required checks in place
Solution:
Update the readiness check to detect that replication was stopped and fail the readiness accordingly
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability