-
Notifications
You must be signed in to change notification settings - Fork 287
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
relay(dm): send one heartbeat for successive skipped GTID #5070
Conversation
Signed-off-by: lance6716 <lance6716@gmail.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
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-dm-integration-test |
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #5070 +/- ##
================================================
- Coverage 56.1240% 56.0699% -0.0541%
================================================
Files 522 526 +4
Lines 65325 67398 +2073
================================================
+ Hits 36663 37790 +1127
- Misses 25094 25891 +797
- Partials 3568 3717 +149 |
/run-dm-integration-test |
dm/relay/local_reader.go
Outdated
if state.replaceWithHeartbeat { | ||
// ref https://github.com/pingcap/tiflow/issues/5063#issuecomment-1082678211 | ||
// heartbeat period is implemented in LocalStreamer.GetEvent | ||
if state.skipGTID { | ||
switch e.Event.(type) { | ||
// Only replace transaction event | ||
// Other events such as FormatDescriptionEvent, RotateEvent, etc. should be the same as before | ||
case *replication.RowsEvent, *replication.QueryEvent, *replication.GTIDEvent, *replication.XIDEvent, *replication.TableMapEvent: |
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 we missed *replication.MariadbGTIDEvent
} else if lastSkipGTID && state.lastSkipGTIDHeader != nil { | ||
// skipGTID is turned off after this event | ||
select { | ||
case s.ch <- event.GenHeartbeatEvent(state.lastSkipGTIDHeader): | ||
case <-ctx.Done(): |
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.
prefer remove this branch, since we don't have strong dependency on heartbeat event and LocalStreamer.GetEvent
has simulate normal heartbeat.
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.
mainly to reduce the behaving difference with MySQL, the original purpose is stated in pingcap/dm#1390
Signed-off-by: lance6716 <lance6716@gmail.com>
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.
lgtm
PTAL @GMHDBJD |
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.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 9669072
|
/run-dm-integration-test |
1 similar comment
/run-dm-integration-test |
@lance6716: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
Signed-off-by: lance6716 <lance6716@gmail.com>
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 69c565a
|
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created: #5092. |
In response to a cherrypick label: new pull request created: #5093. |
In response to a cherrypick label: new pull request created: #5094. |
Signed-off-by: lance6716 lance6716@gmail.com
What problem does this PR solve?
Issue Number: ref #5063
What is changed and how it works?
see #5063 (comment)
Check List
Tests
Related changes
Release note