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

owner: fix unlimited log print "meet lease not found error, refresh session" (#57564) #57568

Closed ti-chi-bot closed 1 day ago

ti-chi-bot commented 2 days ago

This is an automated cherry-pick of #57564

What problem does this PR solve?

Issue Number: close #57533

Problem Summary:

What changed and how does it work?

I'm not sure how the error is triggered. But reading the code, I can see that line 405, if condition terror.ErrorEqual(err, rpctypes.ErrLeaseNotFound) hold, the error is not reset. So this loop will happen again and again, cause the log print.

Check List

Tests

Don't know how to reproduce but it's easy to fix by reading the code

Side effects

Documentation

Release note

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

None
codecov[bot] commented 2 days ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (release-8.5@a568fdc). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-8.5 #57568 +/- ## ================================================ Coverage ? 57.0239% ================================================ Files ? 1770 Lines ? 627028 Branches ? 0 ================================================ Hits ? 357556 Misses ? 245386 Partials ? 24086 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb/pull/57568/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/57568/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `36.8758% <0.0000%> (?)` | | | [unit](https://app.codecov.io/gh/pingcap/tidb/pull/57568/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `72.6718% <0.0000%> (?)` | | 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/57568/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/57568/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `52.9478% <0.0000%> (?)` | | | [parser](https://app.codecov.io/gh/pingcap/tidb/pull/57568/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `∅ <0.0000%> (?)` | | | [br](https://app.codecov.io/gh/pingcap/tidb/pull/57568/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `52.3287% <0.0000%> (?)` | |

🚨 Try these New Features:

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, tiancaiamao

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: - ~~[pkg/owner/OWNERS](https://github.com/pingcap/tidb/blob/release-8.5/pkg/owner/OWNERS)~~ [D3Hunter] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 1 day ago

[LGTM Timeline notifier]

Timeline:

tiancaiamao commented 1 day ago

/retest

D3Hunter commented 1 day ago

/retest