sink & mounter: refine the struct of row changed events#830
Merged
Conversation
added 3 commits
August 10, 2020 14:18
Contributor
Author
|
/run-integration-tests |
added 2 commits
August 10, 2020 17:02
Contributor
Author
|
/run-integration-tests |
Contributor
Author
|
/run-integration-tests |
Contributor
Author
|
/run-integration-tests |
Contributor
Author
|
/run-integration-tests |
Contributor
Author
|
/run-integration-tests |
Codecov Report
@@ Coverage Diff @@
## master #830 +/- ##
===========================================
Coverage 33.2309% 33.2309%
===========================================
Files 97 97
Lines 11390 11390
===========================================
Hits 3785 3785
Misses 7253 7253
Partials 352 352 |
Contributor
Author
|
/run-all-tests |
added 2 commits
August 11, 2020 15:43
Contributor
Author
|
/run-kafka-tests |
liuzix
reviewed
Aug 11, 2020
Contributor
Author
|
@liuzix PTAL again |
Contributor
|
/lgtm |
amyangfei
reviewed
Aug 12, 2020
| } | ||
| } | ||
| if idx.Primary || idx.Unique { | ||
| if ti.IsIndexUnique(idx, true) { |
Contributor
There was a problem hiding this comment.
suggest to use another function for the condition of allowColumnNullable=true
Comment on lines
+212
to
+224
| flag := ti.ColumnsFlag[colInfo.ID] | ||
| if idxInfo.Primary { | ||
| flag.SetIsPrimaryKey() | ||
| } | ||
| if idxInfo.Unique { | ||
| flag.SetIsUniqueKey() | ||
| } | ||
| if len(idxInfo.Columns) > 1 { | ||
| flag.SetIsMultipleKey() | ||
| } | ||
| if idxInfo.ID == ti.HandleIndexID && ti.HandleIndexID >= 0 { | ||
| flag.SetIsHandleKey() | ||
| } |
Contributor
There was a problem hiding this comment.
Seems some flags including PrimaryKey, UniqueKey and IsHandleKey have been set in L184-L195
Contributor
Author
There was a problem hiding this comment.
yes, some flags will be set twice, but the final result will not be affected.
ti-srebot
approved these changes
Aug 12, 2020
Contributor
|
/merge |
Contributor
|
/run-all-tests |
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.
What problem does this PR solve?
the new struct of row change events
Delete,IndieMarkCol,Keyswill be removed in next PRColumnsandPreColumnsColumnsare fixed. If a row event has only partial columns, the missing columns are filled usingnil. for example, a complete event like :RowChangedEvent{Columns:[col1,col2,col3]}, in the event of deletion, cdc only gets column 3, like:RowChangedEvent{Columns:[nil,nil,col3]}.Check List
Tests
Release note