-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VReplication: Set VReplicationStreamState
to Copying on resumption
#15336
VReplication: Set VReplicationStreamState
to Copying on resumption
#15336
Conversation
Previously, the `VReplicationStreamState` would initialize as Copying, but if stopped and restarted, the state shows as Running (despite the workflow status showing as Copying). This mismatch can cause errors in reporting and monitoring (depending on which status one recognizes). This change sets the `VReplicationWorkflowState` (and thereby `VReplicationStreamState`) as Copying when the copy workflow is resumed. The workflow status and `VReplicationStreamState` stat are now synced. Signed-off-by: Tyler Coleman <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
if err := vc.vr.setState(binlogdatapb.VReplicationWorkflowState_Copying, ""); err != nil { | ||
return err | ||
} |
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.
See also:
vitess/go/vt/vttablet/tabletmanager/vreplication/vcopier.go
Lines 246 to 248 in 11edc63
if err := vc.vr.setState(binlogdatapb.VReplicationWorkflowState_Copying, ""); err != nil { | |
return err | |
} |
in initTablesForCopy
, which explains why the first run's status shows as Copying, while resuming shows Running (even though we're still copying).
Signed-off-by: Tyler Coleman <[email protected]>
Signed-off-by: Tyler Coleman <[email protected]>
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
If no action is taken within 7 days, this PR will be closed. |
This PR was closed because it has been stale for 7 days with no activity. |
Description
Previously, the
VReplicationStreamState
would initialize as Copying, but if stopped and restarted, the state shows as Running (despite the workflow status showing as Copying). This mismatch can cause errors in reporting and monitoring (depending on which status one recognizes).This change sets the
VReplicationWorkflowState
(and therebyVReplicationStreamState
) as Copying when the copy workflow is resumed. The workflow status andVReplicationStreamState
stat are now synced.Related Issue(s)
Fixes #15337
Checklist
Deployment Notes
N/A