-
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: make flags workflow-specific and dynamically changeable #16583
VReplication: make flags workflow-specific and dynamically changeable #16583
Conversation
d78b7c1
to
f196d55
Compare
e1240ba
to
42489bb
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.
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.
@@ -2362,6 +2361,7 @@ func (s *Server) WorkflowUpdate(ctx context.Context, req *vtctldatapb.WorkflowUp | |||
span.Annotate("tablet_types", req.TabletRequest.TabletTypes) | |||
span.Annotate("on_ddl", req.TabletRequest.OnDdl) | |||
span.Annotate("state", req.TabletRequest.State) | |||
span.Annotate("config_overrides", req.TabletRequest.ConfigOverrides) |
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.
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>
…rror early. Related refactor. Add debug/env VReplicationConfig stats to expose currently used flags 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>
Description
Currently several configuration options for VReplication Workflows are
vttablet
flags. This means that any change requires restarts of vttablets. This PR allowsWorkflow Update
to 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
source
and not thetarget
for the vstreamers.A
stats
object (accessible viadebug/vars
) is exported per workflow stream with the current merged config values for that stream.Note:
MoveTables
orReshard
workflows 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
config
has been added to theoptions
json 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
controller
on the target loads theconfig
values into its local scopeList of all current dynamic flags
Related Issue(s)
Fixes #16489
Checklist