Skip to content

NotifyUpdateSysVarCache misses a timeout deadline on etcd request #60665

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

Closed
qts0312 opened this issue Apr 18, 2025 · 1 comment · Fixed by #61154
Closed

NotifyUpdateSysVarCache misses a timeout deadline on etcd request #60665

qts0312 opened this issue Apr 18, 2025 · 1 comment · Fixed by #61154
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@qts0312
Copy link
Contributor

qts0312 commented Apr 18, 2025

Bug Report

Function NotifyUpdateSysVarCache in pkg/domain/domain.go does not set a timeout deadline for etcd request Put

_, err := row.Put(context.Background(), sysVarCacheKey, "")

As the background context will never be canceled, this function will stuck endlessly when the etcd request meets a timeout error.

1. Minimal reproduce step (Required)

Any statements related to NotifyUpdateSysVarCache, for example

set global tidb_enable_check_constraint=ON;

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

row.Put(context.Background(), sysVarCacheKey, "") returns DeadlineExceeded.

3. What did you see instead (Required)

row.Put(context.Background(), sysVarCacheKey, "") is stuck, and further block NotifyUpdateSysVarCache endlessly.

4. What is your TiDB version? (Required)

v8.5.0

@qts0312 qts0312 added the type/bug The issue is confirmed as a bug. label Apr 18, 2025
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Apr 22, 2025
@qts0312
Copy link
Contributor Author

qts0312 commented May 17, 2025

fixed by PR #61154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants