-
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
*: make session variables control TiKV client variables. #6322
Conversation
And add a system variable `tidb_backoff_lock_fast` to change the backoff base time on read lock.
What's the benefit of this PR? |
@@ -223,7 +223,7 @@ func Select(ctx context.Context, sctx sessionctx.Context, kvReq *kv.Request, fie | |||
if !sctx.GetSessionVars().EnableStreaming { | |||
kvReq.Streaming = false | |||
} | |||
resp := sctx.GetClient().Send(ctx, kvReq) | |||
resp := sctx.GetClient().Send(ctx, kvReq, sctx.GetSessionVars().KVVars) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not put it in kvReq ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the variables don't belong to the request.
It's long-term variables, only changed by explicit SET
statement.
So we can experiment different values for better performance. |
/run-all-tests |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I am testing the effect of performance of this pr. So wait to merge. |
And add a system variable
tidb_backoff_lock_fast
to change the backoff base time on read lock.