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

mysql-sink: add more performance related metrics #702

Merged
merged 7 commits into from
Jul 1, 2020

Conversation

amyangfei
Copy link
Contributor

@amyangfei amyangfei commented Jun 29, 2020

What problem does this PR solve?

Solve #685

What is changed and how it works?

  • Add bucket size to monitor SQL distribution in each MySQL sink worker.
  • Add detect conflict duration metric to monitor wait time for each txn due to conflict.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

Screen Shot 2020-06-29 at 16 28 49

Screen Shot 2020-06-29 at 16 37 01

Related changes

  • Need to cherry-pick to the release branch

Release note

  • No release note

@amyangfei
Copy link
Contributor Author

/run-integration-tests

@amyangfei amyangfei added the status/ptal Could you please take a look? label Jun 29, 2020
@amyangfei
Copy link
Contributor Author

/run-integration-tests

Copy link
Member

@overvenus overvenus 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

Comment on lines +52 to +58
bucketSizeCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "ticdc",
Subsystem: "sink",
Name: "bucket_size",
Help: "size of the DML bucket",
}, []string{"capture", "changefeed", "bucket"})
Copy link
Member

Choose a reason for hiding this comment

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

Looks like gauge is more suitable for size.

Copy link
Contributor Author

@amyangfei amyangfei Jun 29, 2020

Choose a reason for hiding this comment

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

Because the sink worker flushes DMLs every 100ms, it is hard to track real bucket size if using gauge, so here use a counter instead.

@amyangfei
Copy link
Contributor Author

/run-integration-tests

@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2020

Codecov Report

Merging #702 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master       #702   +/-   ##
===========================================
  Coverage   31.4172%   31.4172%           
===========================================
  Files            90         90           
  Lines          9307       9307           
===========================================
  Hits           2924       2924           
  Misses         6143       6143           
  Partials        240        240           

Copy link
Contributor

@zier-one zier-one left a comment

Choose a reason for hiding this comment

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

LGTM

@zier-one zier-one added the LGT1 label Jul 1, 2020
@amyangfei amyangfei added this to the v4.0.3 milestone Jul 1, 2020
Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

LGTM

@overvenus
Copy link
Member

/merge

@amyangfei
Copy link
Contributor Author

/run-integration-tests

@amyangfei amyangfei added component/sink Sink component. LGT2 and removed LGT1 status/ptal Could you please take a look? labels Jul 1, 2020
@amyangfei
Copy link
Contributor Author

/merge

@amyangfei amyangfei merged commit bd0ce53 into pingcap:master Jul 1, 2020
@amyangfei amyangfei deleted the mysql-sink-metrics branch July 1, 2020 06:10
5kbpers pushed a commit to 5kbpers/ticdc that referenced this pull request Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/sink Sink component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants