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

Auto analyze throw GCTooEarly error #29862

Closed
wshwsh12 opened this issue Nov 17, 2021 · 3 comments
Closed

Auto analyze throw GCTooEarly error #29862

wshwsh12 opened this issue Nov 17, 2021 · 3 comments
Assignees
Labels
sig/planner SIG: Planner type/bug This issue is a bug.

Comments

@wshwsh12
Copy link
Contributor

wshwsh12 commented Nov 17, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Generate a table that needs analyze more than 20min.
  2. Trigger auto analyze.
  3. Delate the table, and wait gc.
  4. Auto analyze fails, and gets error [tikv:9006]GC life time is shorter than transaction duration, transaction starts at 2021-11-17 14:09:54.756 +0800 CST, GC safe point is 2021-11-17 14:11:54.755 +0800 CST

TiDB only gets all startTs from ProcessLists and reports to PD, but ignore internal session.

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

Analyze success

3. What did you see instead (Required)

Analyze failed

4. What is your TiDB version? (Required)

master.

@wshwsh12 wshwsh12 added the type/bug This issue is a bug. label Nov 17, 2021
@winoros winoros added the sig/planner SIG: Planner label Nov 17, 2021
@winoros
Copy link
Member

winoros commented Nov 17, 2021

The gc worker doesn't watch the internal session. Other internal SQL which may run a lot of time may also meet this issue.

@winoros winoros added the sig/sql-infra SIG: SQL Infra label Nov 17, 2021
@AilinKid AilinKid self-assigned this Nov 18, 2021
@bb7133 bb7133 removed the sig/sql-infra SIG: SQL Infra label Nov 24, 2021
@AilinKid
Copy link
Contributor

After discussion with Eason and Dev guys: this is reasonable, we don't need to extend GC interval to match the internal analyze start timestamp, cause the analyze result for should-be-GCed data doesn't have it meanings. Maybe the log level for the internal sql error should be adjusted lower.

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner type/bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants