-
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
*: preload load frequent use variable #10463
*: preload load frequent use variable #10463
Conversation
/run-all-tests |
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #10463 +/- ##
===============================================
+ Coverage 77.6801% 77.7121% +0.032%
===============================================
Files 413 413
Lines 87505 87559 +54
===============================================
+ Hits 67974 68044 +70
+ Misses 14378 14363 -15
+ Partials 5153 5152 -1 |
executor/set_test.go
Outdated
@@ -325,6 +325,8 @@ func (s *testSuite2) TestSetVar(c *C) { | |||
tk.MustQuery("select @@global.tx_isolation").Check(testkit.Rows("READ-UNCOMMITTED")) | |||
tk.MustQuery("select @@global.transaction_isolation").Check(testkit.Rows("READ-UNCOMMITTED")) | |||
|
|||
tk.MustExec("SET GLOBAL transaction_isolation='REPEATABLE-READ'") |
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.
What's this test case used for?
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.
we should reset tx_isolation back to rr before reset tidb_skip_isolation_level_check.
if we keep global tx_isolation in rc and reset tidb_skip_isolation_level_check to 0, when new session start and retry load global config into the session will meet UnsupportedIsolationLevel
error.
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.
add some comments but maybe we should cascade reset tx_isolation to rr when tidb_skip_isolation_level_check be set to 0? 🤔
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
What problem does this PR solve?
fixes #10388, preload JDBC used variable into memory as default value
this will improve to java based application that frequent establish new connections to TiDB.
What is changed and how it works?
preload those variable:
so, they can preload into session.
change
MaxAllowedPacket
as global + session scope https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_allowed_packetalso change
InitConnect
,QueryCacheSize
from global scope to global + session scope, this is not same with mysql, but doesn't break behave. why we need change this is TiDB will access kv every time if it's a global only variable, but for this two variable we no need do that in performance reason.Check List
Tests
Code changes
Side effects
Related changes
This change is