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

lock_resolver: let resolve lock timeout properly #847

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

zyguan
Copy link
Contributor

@zyguan zyguan commented Jun 20, 2023

fix pingcap/tidb#44822 , after this PR tidb can pass the test.

2023-06-20_120206

…eout

Signed-off-by: zyguan <zhongyangguan@gmail.com>
@disksing disksing merged commit 04dc78e into tikv:master Jun 21, 2023
@@ -693,6 +693,7 @@ func (lr *LockResolver) getTxnStatusFromLock(bo *retry.Backoffer, l *Lock, calle
// success before the primary region.
if err := bo.Backoff(retry.BoTxnNotFound, err); err != nil {
logutil.Logger(bo.GetCtx()).Warn("getTxnStatusFromLock backoff fail", zap.Error(err))
return TxnStatus{}, err
Copy link
Contributor

Choose a reason for hiding this comment

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

I vaguely remember that this was intentionally designed in 4.0 to solve some problems, but I can't recall the details.
@MyonKeminta Do you remember?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems to address some issues with resolving v4.0 optimistic mode, but it has no impact on the current default pessimistic mode. Maybe we still need to look into historical problems.

@cfzjywxk
Copy link
Contributor

I think it's better to merge PRs affecting critical path with 2-3 approvals.

iosmanthus added a commit that referenced this pull request Jun 29, 2023
Co-authored-by: disksing <i@disksing.com>
Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
Co-authored-by: Hu# <ihusharp@gmail.com>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: you06 <you1474600@gmail.com>
Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: Hu# <jinhao.hu@pingcap.com>
Co-authored-by: zzm <zhouzemin@pingcap.com>
Co-authored-by: Yongbo Jiang <cabinfeveroier@gmail.com>
Co-authored-by: crazycs <crazycs520@gmail.com>
Co-authored-by: glorv <glorvs@163.com>
Co-authored-by: zyguan <zhongyangguan@gmail.com>
ResolvedTS error just write in debug log (#814)
ResolvedTS error just write in debug log (#825)
fix ci (#835)
fix rpc interceptor data race (#845)
resolver: let getTxnStatusFromLock return error when backoff timeout (#847)
iosmanthus added a commit that referenced this pull request Jun 29, 2023
Co-authored-by: disksing <i@disksing.com>
Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
Co-authored-by: Hu# <ihusharp@gmail.com>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: you06 <you1474600@gmail.com>
Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: Hu# <jinhao.hu@pingcap.com>
Co-authored-by: zzm <zhouzemin@pingcap.com>
Co-authored-by: Yongbo Jiang <cabinfeveroier@gmail.com>
Co-authored-by: crazycs <crazycs520@gmail.com>
Co-authored-by: glorv <glorvs@163.com>
Co-authored-by: zyguan <zhongyangguan@gmail.com>
ResolvedTS error just write in debug log (#814)
ResolvedTS error just write in debug log (#825)
fix ci (#835)
fix rpc interceptor data race (#845)
resolver: let getTxnStatusFromLock return error when backoff timeout (#847)
zyguan added a commit to zyguan/client-go that referenced this pull request Jun 30, 2023
…eout (tikv#847)

Signed-off-by: zyguan <zhongyangguan@gmail.com>
Co-authored-by: disksing <i@disksing.com>
cfzjywxk pushed a commit that referenced this pull request Jun 30, 2023
…eout (#847) (#861)

Signed-off-by: zyguan <zhongyangguan@gmail.com>
Co-authored-by: disksing <i@disksing.com>
zyguan added a commit to zyguan/client-go that referenced this pull request Jul 12, 2023
…eout (tikv#847)

Signed-off-by: zyguan <zhongyangguan@gmail.com>
Co-authored-by: disksing <i@disksing.com>
cfzjywxk pushed a commit that referenced this pull request Jul 12, 2023
…eout (#847) (#881)

Signed-off-by: zyguan <zhongyangguan@gmail.com>
Co-authored-by: disksing <i@disksing.com>
zyguan added a commit to zyguan/client-go that referenced this pull request Aug 16, 2023
…eout (tikv#847)

Signed-off-by: zyguan <zhongyangguan@gmail.com>
Co-authored-by: disksing <i@disksing.com>
cfzjywxk pushed a commit that referenced this pull request Aug 16, 2023
…eout (#847) (#947)

Signed-off-by: zyguan <zhongyangguan@gmail.com>
Co-authored-by: disksing <i@disksing.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve lock may hang for a long time after clock skew
3 participants