Skip to content

min start ts of initStatsCtx is not tracked #53592

Closed
@you06

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.severity/majorsig/transactionSIG:Transactiontype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions