Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

syncer: refine heartbeat #704

Merged
merged 5 commits into from
Jun 11, 2020
Merged

syncer: refine heartbeat #704

merged 5 commits into from
Jun 11, 2020

Conversation

csuzhangxc
Copy link
Member

@csuzhangxc csuzhangxc commented Jun 3, 2020

What problem does this PR solve?

What is changed and how it works?

  • compare heartbeat schema and table as case-insensitive
  • do not update replication lag metric if no valid slave ts exit
  • use UTC_TIMESTAMP(6) to replace UTC_TIMESTAMP()

Check List

Tests

  • Unit test
  • Integration test

Related changes

  • Need to be included in the release note

@csuzhangxc csuzhangxc added status/WIP This PR is still work in progress type/bug-fix Bug fix labels Jun 3, 2020
@csuzhangxc csuzhangxc added this to the v1.0.6 milestone Jun 3, 2020
@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

Merging #704 into release-1.0 will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           release-1.0       #704   +/-   ##
==============================================
  Coverage      57.9412%   57.9412%           
==============================================
  Files              166        166           
  Lines            16981      16981           
==============================================
  Hits              9839       9839           
  Misses            6187       6187           
  Partials           955        955           

@csuzhangxc
Copy link
Member Author

/run-all-tests

@csuzhangxc csuzhangxc added status/PTAL This PR is ready for review. Add this label back after committing new changes and removed status/WIP This PR is still work in progress labels Jun 3, 2020
@csuzhangxc csuzhangxc requested a review from GMHDBJD June 3, 2020 08:20
@csuzhangxc
Copy link
Member Author

@GMHDBJD PTAL

Copy link
Collaborator

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

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

LGTM

@GMHDBJD GMHDBJD added status/LGT1 One reviewer already commented LGTM and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Jun 3, 2020
Copy link
Contributor

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

syncer/heartbeat.go Show resolved Hide resolved
@@ -101,8 +101,8 @@ function run() {
# use sync_diff_inspector to check data now!
check_sync_diff $WORK_DIR $cur/conf/diff_config.toml

check_metric $WORKER1_PORT 'dm_syncer_replication_lag{task="test"}' 3 0 1
check_metric $WORKER2_PORT 'dm_syncer_replication_lag{task="test"}' 3 0 1
check_metric $WORKER1_PORT 'dm_syncer_replication_lag{task="test"}' 3 0 2
Copy link
Contributor

Choose a reason for hiding this comment

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

why need to increase the upper to 2? It seems that use UTC_TIMESTAMP(6) to replace UTC_TIMESTAMP when update ts will decrease the replication lag.

Copy link
Member Author

@csuzhangxc csuzhangxc Jun 11, 2020

Choose a reason for hiding this comment

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

I saw lag with 1.x (but < 1.5) in some cases. in the old UTC_TIMESTAMP it ==1, but now it > 1.

@WangXiangUSTC
Copy link
Contributor

LGTM

@WangXiangUSTC WangXiangUSTC added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Jun 11, 2020
@csuzhangxc csuzhangxc merged commit 9b6c012 into release-1.0 Jun 11, 2020
@csuzhangxc csuzhangxc deleted the heartbeat-ci branch June 11, 2020 05:00
csuzhangxc added a commit to csuzhangxc/dm that referenced this pull request Jun 11, 2020
csuzhangxc added a commit that referenced this pull request Jun 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/LGT2 Two reviewers already commented LGTM, ready for merge type/bug-fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants