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

min start ts of initStatsCtx is not tracked #53592

Closed
you06 opened this issue May 27, 2024 · 0 comments · Fixed by #53602
Closed

min start ts of initStatsCtx is not tracked #53592

you06 opened this issue May 27, 2024 · 0 comments · Fixed by #53602
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. severity/major sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@you06
Copy link
Contributor

you06 commented May 27, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

tidb/pkg/session/session.go

Lines 3510 to 3514 in 2300ac6

// setup init stats loader
initStatsCtx, err := createSession(store)
if err != nil {
return nil, err
}

The min start ts will block gc to guarantee the ongoing transaction can see its data, but the min start ts of initStatsCtx is not tracked.

1. Minimal reproduce step (Required)

Inject 30min sleep when loading stats in init context.

See commit.

2. What did you expect to see? (Required)

Stats loaded after 30min.

3. What did you see instead (Required)

[2024/05/27 21:08:25.631 +09:00] [ERROR] [domain.go:2314] ["init stats info failed"] [lite=true] ["take time"=30m0.002233833s] [error="[tikv:9006]GC life time is shorter than transaction duration, transaction starts at 2024-05-27 20:38:25.628 +0900 JST, GC safe point is 2024-05-27 20:49:25.682 +0900 JST"]

4. What is your TiDB version? (Required)

f5ac93e

@you06 you06 added the type/bug The issue is confirmed as a bug. label May 27, 2024
you06 added a commit to you06/tidb that referenced this issue May 27, 2024
@jebter jebter added sig/planner SIG: Planner affects-7.5 This bug affects the 7.5.x(LTS) versions. and removed sig/sql-infra SIG: SQL Infra labels May 28, 2024
@you06 you06 added affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. sig/transaction SIG:Transaction and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-8.1 sig/planner SIG: Planner labels May 28, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. severity/major sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants