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

table cache lease too short cause load data infinitely #33167

Closed
tiancaiamao opened this issue Mar 16, 2022 · 1 comment · Fixed by #33408
Closed

table cache lease too short cause load data infinitely #33167

tiancaiamao opened this issue Mar 16, 2022 · 1 comment · Fixed by #33408
Labels
affects-6.0 feature/developing the related feature is in development severity/moderate type/bug The issue is confirmed as a bug.

Comments

@tiancaiamao
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Testing table cache feature, sysbench oltp_read_only, table size 100000, 32 tables, 'alter table cache'
When the machine load is heavy, load table takes more than 3s
However, the default lease time is 3s...
It means the loaded data is outdated immediately, so the date is reloaded, and the process repeat forever

It waste a lot of CPU resource and make the QPS low.

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

Table cache lease is long, and load data is fast, so the load data is infrequent and renew lease enlarge the TTL of the loaded data.

3. What did you see instead (Required)

Table cache lease is short, and load data takes long.
The data is outdated immediately after it's loaded! So the loading process repeat again and again

image

4. What is your TiDB version? (Required)

master 2ae7132

@tiancaiamao tiancaiamao added type/bug The issue is confirmed as a bug. severity/moderate feature/developing the related feature is in development labels Mar 16, 2022
@tiancaiamao
Copy link
Contributor Author

tiancaiamao commented Mar 16, 2022

It can be work around by set the @@tidb_table_cache_lease to a larger value, for example, set it to 10 and the problem disappear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.0 feature/developing the related feature is in development severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant