Skip to content
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

binlog: do not decode rows for block table #7622

Merged
merged 9 commits into from
Nov 24, 2022

Conversation

GMHDBJD
Copy link
Contributor

@GMHDBJD GMHDBJD commented Nov 16, 2022

What problem does this PR solve?

Issue Number: ref #4287
pingcap/dm#924 pingcap/dm#2281 go-mysql-org/go-mysql#737

What is changed and how it works?

  • do not decode rows for block table

Check List

Tests

  • Unit test
  • Integration test

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

do not decode rows for block table

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 16, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • buchuitoudegou
  • lance6716

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 16, 2022
@GMHDBJD GMHDBJD added status/ptal Could you please take a look? area/dm Issues or PRs related to DM. labels Nov 16, 2022
@ti-chi-bot ti-chi-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 16, 2022
@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Nov 17, 2022

/run-all-tests

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2022

Codecov Report

Merging #7622 (71ce943) into master (0438dd4) will decrease coverage by 0.2552%.
The diff coverage is 36.2754%.

Additional details and impacted files
Flag Coverage Δ
cdc 66.2273% <34.7921%> (-0.6895%) ⬇️
dm 52.1216% <21.5686%> (+0.0388%) ⬆️
engine 63.7677% <68.1818%> (-0.0183%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             master      #7622        +/-   ##
================================================
- Coverage   60.0458%   59.7906%   -0.2553%     
================================================
  Files           807        811         +4     
  Lines         92391      92869       +478     
================================================
+ Hits          55477      55527        +50     
- Misses        32099      32497       +398     
- Partials       4815       4845        +30     

@@ -288,7 +288,7 @@ func (c *StreamerController) resetReplicationSyncer(tctx *tcontext.Context, loca
if c.currentBinlogType == RemoteBinlog {
c.streamProducer = &remoteBinlogReader{replication.NewBinlogSyncer(c.syncCfg), tctx, c.syncCfg.Flavor, c.enableGTID}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to abandon these blocked events while using a remote binlog reader?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c.syncCfg is created by

func subtaskCfg2BinlogSyncerCfg(cfg *config.SubTaskConfig, timezone *time.Location, baList *filter.Filter) (replication.BinlogSyncerConfig, error) {
, which abandon these blocked events

}
if skipByTable(baList, tb) {
if len(blockListCache) >= maxCapacity {
blockListCache = make(map[uint64]struct{}, maxCapacity)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will prefer to evict one record rather than reset the whole cache. Maybe an LRU or CLOCK cache is more appropriate.

But it might be rare to run out of capacity, so it's okay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a TODO c5511e7

source $cur/../_utils/test_prepare
WORK_DIR=$TEST_DIR/$TEST_NAME

function run() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you leave a comment to illustrate what this test intends to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean this used to manually test MariaDB? I remember we don't have MariaDB in CI

Copy link
Contributor Author

@GMHDBJD GMHDBJD Nov 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, v10.0

@@ -26,7 +26,7 @@ require (
github.com/gin-gonic/gin v1.7.4
github.com/glebarez/go-sqlite v1.17.3
github.com/glebarez/sqlite v1.4.6
github.com/go-mysql-org/go-mysql v1.6.1-0.20220718092400-c855c26b37bd
github.com/go-mysql-org/go-mysql v1.6.1-0.20221116091419-49d58c4c3e4c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be grateful if you comment on the code to specify the change in this repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add link in pr header

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 18, 2022
@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Nov 18, 2022

/run-all-tests

@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Nov 22, 2022

/run-all-tests

@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Nov 22, 2022

/run-all-tests

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14 / 19 files viewed

@@ -9,3 +9,5 @@ sequence_sharding_optimistic
sequence_sharding_removemeta
gtid
only_dml
adjust_gtid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's moved to the first line

source $cur/../_utils/test_prepare
WORK_DIR=$TEST_DIR/$TEST_NAME

function run() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean this used to manually test MariaDB? I remember we don't have MariaDB in CI

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest lgtm

@@ -9,3 +9,4 @@ sequence_sharding_optimistic
sequence_sharding_removemeta
gtid
only_dml
binlog_parse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

others_integration_1.txt is the slowest stage in CI! please move it to other_2 or 3

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 23, 2022
@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Nov 24, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 9a3e548

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 24, 2022
@ti-chi-bot
Copy link
Member

@GMHDBJD: 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.

@ti-chi-bot ti-chi-bot merged commit 9db6370 into pingcap:master Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. status/ptal Could you please take a look?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants