VReplication: make flags workflow-specific and dynamically changeable#16583
Merged
rohit-nayak-ps merged 58 commits intovitessio:mainfrom Sep 18, 2024
Merged
VReplication: make flags workflow-specific and dynamically changeable#16583rohit-nayak-ps merged 58 commits intovitessio:mainfrom
rohit-nayak-ps merged 58 commits intovitessio:mainfrom
Conversation
d78b7c1 to
f196d55
Compare
e1240ba to
42489bb
Compare
mattlord
approved these changes
Sep 10, 2024
Member
mattlord
left a comment
There was a problem hiding this comment.
Nice work on this! I pushed a commit to address my own nits. If any tests fail then I'll push another commit to fix them.
deepthi
approved these changes
Sep 12, 2024
go/vt/vtctl/workflow/server.go
Outdated
Collaborator
There was a problem hiding this comment.
Is there a standard naming convention for these annotations?
bc5a2e9 to
111541c
Compare
… 'Workflow update' and display with 'Workflow get'. No validations on keys or values atm Signed-off-by: Rohit Nayak <rohit@planetscale.com>
… common default and init flag defaults from it. Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
…kdb logs. Properly init workflow config in vreplication unit tests Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
6c98b19 to
8dee3a2
Compare
… and not locally Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
5 tasks
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.
Description
Currently several configuration options for VReplication Workflows are
vttabletflags. This means that any change requires restarts of vttablets. This PR allowsWorkflow Updateto set these flags for a specific workflow. On a workflow init the config overrides are merged into the default values (which are the ones specified via the vttablet flags).A major refactor was required to pass the config through to the various components where the vttablet flag values were directly used.
The workflow's config is also passed along to the source VStreamers (for both the copy and binlog player phases). This allows the user to override the flags on the source vttablet's as well by just specifying it for the workflow. If not overridden, the flag values are picked up from the
sourceand not thetargetfor the vstreamers.A
statsobject (accessible viadebug/vars) is exported per workflow stream with the current merged config values for that stream.Note:
MoveTablesorReshardworkflows or for any running workflow usingWorkflow Update.WorkflowUpdate, otherwise the existing controllers will not pick up the new values.Workflow Update.Persistence
A new sub-object
confighas been added to theoptionsjson document column in_vt.vreplication. This is a map of key/value pairs, for the overriden flags, with their workflow-specific values. The key is the flag name and value a string representation of the value. Appropriate serialization and deserialization is done while storing the values and reading it back.Related Changes
controlleron the target loads theconfigvalues into its local scopeList of all current dynamic flags
Related Issue(s)
Fixes #16489
Checklist