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

dr-autosync: add metrics #7110

Merged
merged 11 commits into from
Sep 25, 2023
Merged

dr-autosync: add metrics #7110

merged 11 commits into from
Sep 25, 2023

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Sep 19, 2023

What problem does this PR solve?

Issue Number: Close #6975

What is changed and how does it work?

add some dr-autosync related metrics

image

numbers are used to distinguish different states, the map is

1: sync
2: async_wait
3: async
4: sync_recover

Check List

Tests

  • Manual test (add detailed scripts or steps below)

sync state

# HELP pd_replication_dr_recover_progress Progress of sync_recover process
# TYPE pd_replication_dr_recover_progress gauge
pd_replication_dr_recover_progress 0
# HELP pd_replication_dr_recovered_region Number of recovered regions
# TYPE pd_replication_dr_recovered_region gauge
pd_replication_dr_recovered_region 0
# HELP pd_replication_dr_state State of DR
# TYPE pd_replication_dr_state gauge
pd_replication_dr_state 1
# HELP pd_replication_dr_state_id State ID of DR
# TYPE pd_replication_dr_state_id gauge
pd_replication_dr_state_id 10
# HELP pd_replication_dr_tick_total Counter of background state check count
# TYPE pd_replication_dr_tick_total counter
pd_replication_dr_tick_total 64

async wait

# HELP pd_replication_dr_recover_progress Progress of sync_recover process
# TYPE pd_replication_dr_recover_progress gauge
pd_replication_dr_recover_progress 0
# HELP pd_replication_dr_recovered_region Number of recovered regions
# TYPE pd_replication_dr_recovered_region gauge
pd_replication_dr_recovered_region 0
# HELP pd_replication_dr_state State of DR
# TYPE pd_replication_dr_state gauge
pd_replication_dr_state 2
# HELP pd_replication_dr_state_id State ID of DR
# TYPE pd_replication_dr_state_id gauge
pd_replication_dr_state_id 221
# HELP pd_replication_dr_tick_total Counter of background state check count
# TYPE pd_replication_dr_tick_total counter
pd_replication_dr_tick_total 311

async

# HELP pd_replication_dr_recover_progress Progress of sync_recover process
# TYPE pd_replication_dr_recover_progress gauge
pd_replication_dr_recover_progress 0
# HELP pd_replication_dr_recovered_region Number of recovered regions
# TYPE pd_replication_dr_recovered_region gauge
pd_replication_dr_recovered_region 0
# HELP pd_replication_dr_state State of DR
# TYPE pd_replication_dr_state gauge
pd_replication_dr_state 3
# HELP pd_replication_dr_state_id State ID of DR
# TYPE pd_replication_dr_state_id gauge
pd_replication_dr_state_id 222
# HELP pd_replication_dr_tick_total Counter of background state check count
# TYPE pd_replication_dr_tick_total counter
pd_replication_dr_tick_total 385

sync recover

# HELP pd_replication_dr_recover_progress Progress of sync_recover process
# TYPE pd_replication_dr_recover_progress gauge
pd_replication_dr_recover_progress 0.24528302252292633
# HELP pd_replication_dr_recovered_region Number of recovered regions
# TYPE pd_replication_dr_recovered_region gauge
pd_replication_dr_recovered_region 0
# HELP pd_replication_dr_state State of DR
# TYPE pd_replication_dr_state gauge
pd_replication_dr_state 4
# HELP pd_replication_dr_state_id State ID of DR
# TYPE pd_replication_dr_state_id gauge
pd_replication_dr_state_id 223
# HELP pd_replication_dr_tick_total Counter of background state check count
# TYPE pd_replication_dr_tick_total counter
pd_replication_dr_tick_total 393

sync

# HELP pd_replication_dr_recover_progress Progress of sync_recover process
# TYPE pd_replication_dr_recover_progress gauge
pd_replication_dr_recover_progress 1
# HELP pd_replication_dr_recovered_region Number of recovered regions
# TYPE pd_replication_dr_recovered_region gauge
pd_replication_dr_recovered_region 53
# HELP pd_replication_dr_state State of DR
# TYPE pd_replication_dr_state gauge
pd_replication_dr_state 1
# HELP pd_replication_dr_state_id State ID of DR
# TYPE pd_replication_dr_state_id gauge
pd_replication_dr_state_id 224
# HELP pd_replication_dr_tick_total Counter of background state check count
# TYPE pd_replication_dr_tick_total counter
pd_replication_dr_tick_total 614

Release note

None.

fix tikv#6975

Signed-off-by: disksing <i@disksing.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 19, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • nolouch

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 bot added the release-note-none Denotes a PR that doesn't merit a release note. label Sep 19, 2023
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 19, 2023
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #7110 (179676d) into master (3c632b1) will increase coverage by 0.02%.
Report is 1 commits behind head on master.
The diff coverage is 86.36%.

@@            Coverage Diff             @@
##           master    #7110      +/-   ##
==========================================
+ Coverage   74.40%   74.42%   +0.02%     
==========================================
  Files         440      441       +1     
  Lines       47180    47216      +36     
==========================================
+ Hits        35104    35141      +37     
- Misses       8986     8989       +3     
+ Partials     3090     3086       -4     
Flag Coverage Δ
unittests 74.42% <86.36%> (+0.02%) ⬆️

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

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 22, 2023
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 22, 2023
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 22, 2023
Signed-off-by: disksing <i@disksing.com>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 22, 2023
@disksing
Copy link
Contributor Author

@CabinfeverB added tick rate panel.

@CabinfeverB
Copy link
Member

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 22, 2023

@CabinfeverB: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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
Copy link
Contributor

ti-chi-bot bot commented Sep 22, 2023

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

Commit hash: 34430ea

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 22, 2023
@CabinfeverB
Copy link
Member

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 25, 2023

@disksing: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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.

@disksing
Copy link
Contributor Author

/run-all-tests

@CabinfeverB
Copy link
Member

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2023
@CabinfeverB
Copy link
Member

/hold cancel

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2023
@CabinfeverB
Copy link
Member

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2023
@CabinfeverB
Copy link
Member

/hold cancel

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2023
@ti-chi-bot ti-chi-bot bot merged commit eb6953f into tikv:master Sep 25, 2023
25 checks passed
@disksing disksing added the needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. label Sep 26, 2023
@disksing
Copy link
Contributor Author

/cherry-pick release-6.5

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #7153.

@ti-chi-bot
Copy link
Member

@disksing: new pull request could not be created: failed to create pull request against tikv/pd#release-6.5 from head ti-chi-bot:cherry-pick-7110-to-release-6.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-7110-to-release-6.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

In response to this:

/cherry-pick release-6.5

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 bot pushed a commit that referenced this pull request Sep 26, 2023
close #6975

Signed-off-by: disksing <i@disksing.com>

Co-authored-by: disksing <i@disksing.com>
disksing added a commit to oh-my-tidb/pd that referenced this pull request Oct 30, 2023
close tikv#6975

Signed-off-by: disksing <i@disksing.com>

Co-authored-by: disksing <i@disksing.com>
disksing added a commit that referenced this pull request Oct 30, 2023
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
@TonsnakeLin
Copy link
Contributor

/cherry-pick release-7.1

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Feb 1, 2024
close tikv#6975

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

@TonsnakeLin: new pull request created to branch release-7.1: #7785.

In response to this:

/cherry-pick release-7.1

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.

TonsnakeLin pushed a commit to TonsnakeLin/pd that referenced this pull request Feb 28, 2024
close tikv#6975

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
TonsnakeLin pushed a commit to TonsnakeLin/pd that referenced this pull request Feb 28, 2024
close tikv#6975

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: TonsnakeLin <lpbgytong@163.com>
ti-chi-bot bot pushed a commit that referenced this pull request Mar 1, 2024
close #6975

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

Co-authored-by: disksing <i@disksing.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metric: add add grafana panel for dr-autosync
6 participants