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

*: make session variables control TiKV client variables. #6322

Merged
merged 2 commits into from
Apr 20, 2018

Conversation

coocood
Copy link
Member

@coocood coocood commented Apr 19, 2018

And add a system variable tidb_backoff_lock_fast to change the backoff base time on read lock.

And add a system variable `tidb_backoff_lock_fast` to change the backoff base time on read lock.
@coocood
Copy link
Member Author

coocood commented Apr 19, 2018

@tiancaiamao @jackysp @zz-jason PTAL

@shenli
Copy link
Member

shenli commented Apr 19, 2018

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)
Copy link
Contributor

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 ?

Copy link
Member Author

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.

@coocood
Copy link
Member Author

coocood commented Apr 19, 2018

So we can experiment different values for better performance.

@coocood coocood changed the title *: make session variables control TiKV layer. *: make session variables control TiKV client variables. Apr 19, 2018
@coocood
Copy link
Member Author

coocood commented Apr 20, 2018

/run-all-tests

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 20, 2018
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jackysp
Copy link
Member

jackysp commented Apr 20, 2018

I am testing the effect of performance of this pr. So wait to merge.

@coocood coocood added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 20, 2018
@coocood coocood merged commit 5da8ac0 into pingcap:master Apr 20, 2018
@coocood coocood deleted the kv-variables branch April 20, 2018 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants