-
Notifications
You must be signed in to change notification settings - Fork 288
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
DM: support inject at dml when open GTID #4848
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-all-tests |
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.
typos😀
dm/syncer/err-operator/operator.go
Outdated
@@ -177,6 +177,8 @@ func (h *Holder) MatchAndApply(startLocation, endLocation binlog.Location, curre | |||
h.mu.Lock() | |||
defer h.mu.Unlock() | |||
|
|||
h.logger.Info("try to match and apply a operator", zap.Stringer("startlocation", startLocation), zap.Stringer("endlocation", endLocation), zap.Any("currentEvent", currentEvent)) |
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.
h.logger.Info("try to match and apply a operator", zap.Stringer("startlocation", startLocation), zap.Stringer("endlocation", endLocation), zap.Any("currentEvent", currentEvent)) | |
h.logger.Info("try to match and apply an operator", zap.Stringer("startlocation", startLocation), zap.Stringer("endlocation", endLocation), zap.Any("currentEvent", currentEvent)) |
dm/syncer/err-operator/operator.go
Outdated
@@ -215,7 +217,7 @@ func (h *Holder) MatchAndApply(startLocation, endLocation binlog.Location, curre | |||
} | |||
} | |||
|
|||
h.logger.Info("match and apply a operator", zap.Stringer("startlocation", startLocation), zap.Stringer("endlocation", endLocation), zap.Stringer("operator", operator)) | |||
h.logger.Info("match and apply a operator", zap.Stringer("startlocation", startLocation), zap.Stringer("endlocation", endLocation), zap.Any("currentEvent", currentEvent), zap.Stringer("operator", operator)) |
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.
h.logger.Info("match and apply a operator", zap.Stringer("startlocation", startLocation), zap.Stringer("endlocation", endLocation), zap.Any("currentEvent", currentEvent), zap.Stringer("operator", operator)) | |
h.logger.Info("match and apply an operator", zap.Stringer("startlocation", startLocation), zap.Stringer("endlocation", endLocation), zap.Any("currentEvent", currentEvent), zap.Stringer("operator", operator)) |
/run-all-tests |
@@ -274,6 +274,13 @@ func (l Location) Clone() Location { | |||
return l.CloneWithFlavor("") | |||
} | |||
|
|||
// Clone clones a same location, but reset suffix to 0. |
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.
please left a todo location whit suffix is hadr do understand, let's refine this logic later
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.
yes, suffix logic is hard to understand and it is used in compare location too much. i think i will refine it in other pr.
|
||
return binlog.CompareLocation(pos, b.flushedPoint.location, b.enableGTID) > 0 | ||
// locations in savedPoint have no suffix and may have same giid like handle-error, we can use position to check them | ||
return binlog.CompareLocation(pos, b.flushedPoint.location, false) > 0 |
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.
seems change the logic in binlog.CompareLocation
is more reasonable ?, hardcode to enable gtid to false is too tricky
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.
binlog.CompareLocation
is called in many places and i think we may fix it when we refine suffix. outOfDateBy
is used to check between table checkpoint and global checkpoint for flush, this kind of point should have right position, so we can use position to check.
bwt, i will add more tests about inject
, but first of all, it should not affect other integration tests.
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.
add more tests about inject
will you doing this in thie pr or, is this pr ready for review?
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.
not yet. after some tests, it will be more complex when use sharding ddl.
need fix inject command when it was called in sharding. |
@WizardXiao: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What problem does this PR solve?
Issue Number: ref #4260
What is changed and how it works?
Check List
Tests
Release note