pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.34k stars 5.85k forks source link

executor: Fix unstable test TestTiKVClientReadTimeout #57579

Closed MyonKeminta closed 1 day ago

MyonKeminta commented 1 day ago

What problem does this PR solve?

Issue Number: close #57348

Problem Summary:

What changed and how does it work?

After #57050 , the safety check on stale read ts is made strict, making sure that the stale read ts never exceeds that PD has allocated.

However there seems still exists some test code that have some unsafe usage of stale read (such as reading at now). For these usages, the read ts has chance to exceed PD's max allocated ts, causing the ts validation failed.

Check List

Tests

Side effects

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None
tiprow[bot] commented 1 day ago

Hi @MyonKeminta. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
ti-chi-bot[bot] commented 1 day ago

[LGTM Timeline notifier]

Timeline:

ti-chi-bot[bot] commented 1 day ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, hawkingrei, you06

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/pingcap/tidb/blob/master/OWNERS)~~ [cfzjywxk,hawkingrei,you06] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codecov[bot] commented 1 day ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.4645%. Comparing base (1c059a1) to head (87f59a0). Report is 8 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #57579 +/- ## ================================================ + Coverage 72.8279% 73.4645% +0.6366% ================================================ Files 1676 1676 Lines 463631 463671 +40 ================================================ + Hits 337653 340634 +2981 + Misses 105146 102293 -2853 + Partials 20832 20744 -88 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb/pull/57579/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/pingcap/tidb/pull/57579/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `43.4858% <ø> (?)` | | | [unit](https://app.codecov.io/gh/pingcap/tidb/pull/57579/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `72.2747% <ø> (+0.0527%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/pingcap/tidb/pull/57579/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [dumpling](https://app.codecov.io/gh/pingcap/tidb/pull/57579/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `52.7673% <ø> (ø)` | | | [parser](https://app.codecov.io/gh/pingcap/tidb/pull/57579/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `∅ <ø> (∅)` | | | [br](https://app.codecov.io/gh/pingcap/tidb/pull/57579/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `45.4293% <ø> (-0.0332%)` | :arrow_down: |

🚨 Try these New Features: