This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
syncer: add more metrics; refine batch handle #590
Merged
Merged
Conversation
This file contains 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
csuzhangxc
added
priority/normal
Minor change, requires approval from ≥1 primary reviewer
status/WIP
This PR is still work in progress
type/enhancement
Performance improvement or refactoring
labels
Apr 9, 2020
Codecov Report
@@ Coverage Diff @@
## release-1.0 #590 +/- ##
===================================================
+ Coverage 57.2636% 57.2899% +0.0262%
===================================================
Files 161 161
Lines 16672 16708 +36
===================================================
+ Hits 9547 9572 +25
- Misses 6182 6191 +9
- Partials 943 945 +2 |
IANTHEREAL
previously approved these changes
Apr 9, 2020
IANTHEREAL
previously approved these changes
Apr 9, 2020
IANTHEREAL
previously approved these changes
Apr 9, 2020
@GregoryIan PTAL again |
IANTHEREAL
previously approved these changes
Apr 9, 2020
/run-all-tests |
/run-all-tests |
IANTHEREAL
approved these changes
Apr 9, 2020
IANTHEREAL
reviewed
Apr 9, 2020
@@ -998,6 +998,7 @@ func (s *Syncer) sync(tctx *tcontext.Context, queueBucket string, db *DBConn, jo | |||
for { | |||
select { | |||
case sqlJob, ok := <-jobChan: | |||
queueSizeGauge.WithLabelValues(s.cfg.Name, queueBucket).Set(float64(len(jobChan))) |
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.
multiple queues share same bucket, it would be problem i under some cases.
It is recommended that both slow query
threshold and bucket count be configurable, and these can be optimized later
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
priority/normal
Minor change, requires approval from ≥1 primary reviewer
status/WIP
This PR is still work in progress
type/enhancement
Performance improvement or refactoring
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?
add more metrics for binlog replication unit.
What is changed and how it works?
binlogReadDurationHistogram
binlogEventSizeHistogram
conflictDetectDurationHistogram
queueSizeGauge
stmtHistogram
time.After
to replcatetime.Sleep
)Check List
Tests
Code changes
Side effects
Related changes