Skip to content

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jun 17, 2021

Signed-off-by: lhy1024 admin@liudos.us

What problem does this PR solve?

Issue Number: close #10380

Problem Summary:

query test is unstable, for write request statistics it will be occasionally inaccurate

What is changed and how it works?

What's Changed:

Add more detections while being compatible with occasional redundant qps statistics

Check List

Tests

  • Unit test
  • Integration test
  • Manual test
rm t.log
for i in {1..100}
do
    cargo test --package tests --test integrations -- raftstore::test_stats::test_query_stats --exact --nocapture &>> t.log
    sleep 1
done
cat t.log | grep panic

there is only panic with No address added out of total 1 resolved
image

Release note

None

Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 17, 2021
@lhy1024
Copy link
Contributor Author

lhy1024 commented Jun 17, 2021

/cc @hicqu @nolouch @Yisaer

@ti-chi-bot ti-chi-bot requested review from hicqu, nolouch and Yisaer June 17, 2021 18:54
Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 18, 2021
@hicqu
Copy link
Contributor

hicqu commented Jun 18, 2021

/run-tests

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 18, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • MyonKeminta
  • hicqu

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 18, 2021
@hicqu
Copy link
Contributor

hicqu commented Jun 18, 2021

/merge

@ti-chi-bot
Copy link
Member

@hicqu: 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
Member

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

Commit hash: 614284a

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

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

@lhy1024
Copy link
Contributor Author

lhy1024 commented Jun 18, 2021

/run-tests

@lhy1024
Copy link
Contributor Author

lhy1024 commented Jun 18, 2021

/rebuild

@hicqu
Copy link
Contributor

hicqu commented Jun 18, 2021

/run-tests

@hicqu
Copy link
Contributor

hicqu commented Jun 18, 2021

/rebuild

tiancaiamao pushed a commit to tiancaiamao/tikv that referenced this pull request Aug 11, 2021
* more stable test

Signed-off-by: lhy1024 <admin@liudos.us>

* more stable test

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: tiancaiamao <tiancaiamao@gmail.com>
if QueryStats::get_query_num(query_stat, kind) == expect {
return true;
}
let start = std::time::SystemTime::now();
Copy link
Member

Choose a reason for hiding this comment

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

Why SystemTime is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

used to determine whether to enter an infinite loop

Copy link
Member

Choose a reason for hiding this comment

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

Why can't std::time::Instant detect it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

if let Some(hot_peers) = cluster.pd_client.get_store_hotspots(store_id) {
let peer_stat = hot_peers.get(&region_id).unwrap();
let query_stat = peer_stat.get_query_stats();
if QueryStats::get_query_num(query_stat, kind) == expect {
Copy link
Member

Choose a reason for hiding this comment

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

Since the query is not aggregated, how can it be 100% matching expect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what means ‘aggregated’?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 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.

test case is not stable
5 participants