-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
client-go/safeTS: reduce GetStoreMinResolvedTS
call
#46664
Labels
Comments
4 tasks
/affect-7.1 |
ti-chi-bot
bot
added
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
labels
Sep 5, 2023
nolouch
removed
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
labels
Sep 5, 2023
4 tasks
4 tasks
3 tasks
release-6.5 has been fixed in #46143 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug Report
Please answer these questions before submitting your issue. Thanks!
related to tikv/client-go#922
currently, we try to GetStoreMinResolvedTS for all stores from PD every 2 seconds
Background
For
txn_scope
txn_scope will be global in major situation, So we can judge @@txn_scope value which from the config:
when find is global, we can get cluster-level resolved ts to avoid using kv grpc.
If not, we need to enhance min resolved ts usage:
For
min resolved ts
Nowadays we have 2 api interface for obtaining min resolved ts
We can use the
approach I
to get cluster's min resolved ts when @@txn_scope is global.For client-go's updateSafeTS, we call
approach II
for each store, which is not necessary.We can extend the approach I params to obtain specified store via a list to reduce the cost per call after api: Extend the min-resolved-ts api to support getting the specified store pd#6880 merged
1. Minimal reproduce step (Required)
For example when we have 100 tikvs and 100 tidbs, then the connections for pd/api/v1/min-resolved-ts to PD would be 100*100/2=5000 in 1 seconds.
2. What did you expect to see? (Required)
reduce
pd/api/v1/min-resolved-ts
call3. What did you see instead (Required)
For example when we have 100 tikvs and 100 tidbs, then the connections for pd/api/v1/min-resolved-ts to PD would be 100*100/2=5000 in 1 seconds.
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: