Allow users to control VReplication DDL handling#11532
Merged
mattlord merged 16 commits intovitessio:mainfrom Nov 10, 2022
Merged
Allow users to control VReplication DDL handling#11532mattlord merged 16 commits intovitessio:mainfrom
mattlord merged 16 commits intovitessio:mainfrom
Conversation
Signed-off-by: Matt Lord <mattalord@gmail.com>
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
541d835 to
af4f5ae
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
af4f5ae to
88f2935
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
This was referenced Oct 27, 2022
| return resp, respBody, err | ||
| } | ||
|
|
||
| // TestVreplicationDDLHandling tests the DDL handling in |
Member
There was a problem hiding this comment.
Do we need an end-to-end test here? We have been discussing about reducing CI load by being careful about reviewing existing e2e tests where unit tests coverage is possible.
Member
rohit-nayak-ps
left a comment
There was a problem hiding this comment.
Functionality looks good!
We need to evaluate the need for the e2e test, otherwise lgtm.
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
ajm188
approved these changes
Nov 9, 2022
Contributor
ajm188
left a comment
There was a problem hiding this comment.
(just leaving the placeholder comment, which i know you're pushing a fix for) LGTM!
|
|
||
| import ( | ||
| "context" | ||
| _ "flag" |
This was referenced Jan 11, 2023
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
How VReplication handled DDL encountered in the replication stream was always technically variable and has a passing mention in the docs, but we provided no way to set it as it wasn't recommended to use anything other than the default of
IGNORE(DDL events are ignored by thevappliercomponent on the target shards) — and instead it was recommended that for schema changes which you wanted on the target side, you execute those DDL on the target side first, then on the source side. Technically you could change it but it required modifying the prototext value in the workflow's_vt.vreplication.sourcefield. So in practice, it did not exist.It's been pointed out, however, that it's at least useful to specify a value of
STOP(stop the workflow) so that the workflow is stopped and other orchestration tooling can take action such asCancel'ing the workflow and starting another new one. It's also reasonable that if you really know what you're doing, you could set the handling toEXEC(execute the DDL and treat any errors as workflow errors) or evenEXEC_IGNORE(execute the DDL but ignore any errors). The documentation will need to add proper warnings about the EXEC* options.This PR does the following:
--on-ddl=<action>flag for theMoveTablesandReshardcommands_vt.vreplication.sourcevalue)OnDDLkey in theWorkflow showcommand output IF you specified a non-default (0/IGNORE) value so that we have less noise in the output for most usersManual Test
Click here for details
With the final results being:
Related Issue(s)
Checklist