-
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
Merged
rohit-nayak-ps
merged 58 commits into
vitessio:main
from
planetscale:rohit/vr-dynamic-flags2
Sep 18, 2024
Merged
VReplication: make flags workflow-specific and dynamically changeable #16583
rohit-nayak-ps
merged 58 commits into
vitessio:main
from
planetscale:rohit/vr-dynamic-flags2
Sep 18, 2024
+6,438
−3,822
Conversation
This file contains 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
rohit-nayak-ps
added
Component: VReplication
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
labels
Aug 12, 2024
rohit-nayak-ps
force-pushed
the
rohit/vr-dynamic-flags2
branch
5 times, most recently
from
September 1, 2024 19:26
d78b7c1
to
f196d55
Compare
rohit-nayak-ps
requested review from
deepthi,
harshit-gangal,
mattlord,
GuptaManan100,
frouioui,
ajm188,
notfelineit,
systay,
shlomi-noach and
timvaillancourt
as code owners
September 6, 2024 14:38
rohit-nayak-ps
force-pushed
the
rohit/vr-dynamic-flags2
branch
from
September 7, 2024 11:28
e1240ba
to
42489bb
Compare
mattlord
approved these changes
Sep 10, 2024
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.
deepthi
added
the
release notes (needs details)
This PR needs to be listed in the release notes in a dedicated section (deprecation notice, etc...)
label
Sep 12, 2024
deepthi
approved these changes
Sep 12, 2024
@@ -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?
rohit-nayak-ps
force-pushed
the
rohit/vr-dynamic-flags2
branch
2 times, most recently
from
September 18, 2024 10:48
bc5a2e9
to
111541c
Compare
rohit-nayak-ps
removed
the
release notes (needs details)
This PR needs to be listed in the release notes in a dedicated section (deprecation notice, etc...)
label
Sep 18, 2024
… '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>
…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>
rohit-nayak-ps
force-pushed
the
rohit/vr-dynamic-flags2
branch
from
September 18, 2024 17:23
6c98b19
to
8dee3a2
Compare
… and not locally Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
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