-
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
planner, session: add isolation read with engine type #12997
planner, session: add isolation read with engine type #12997
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12997 +/- ##
================================================
+ Coverage 80.0122% 80.0866% +0.0744%
================================================
Files 468 465 -3
Lines 109697 107757 -1940
================================================
- Hits 87771 86299 -1472
+ Misses 15174 14962 -212
+ Partials 6752 6496 -256 |
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
@lamxTyler Now we can't realize the isolation read by store label. So I change this PR. Please retake a look. |
planner/core/integration_test.go
Outdated
|
||
_, err = tk.Exec("select * from t") | ||
c.Assert(err, NotNil) | ||
c.Assert(err.Error(), Equals, "[planner:1815]Internal : Can't find a proper physical plan for this query") |
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 error message should be more friendly to the user. We should try our best to point out the reason and how to workaround.
formatVal += "," | ||
} | ||
switch { | ||
case strings.EqualFold(engine, kv.TiKV.Name()): |
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.
should we also trim the spaces around each item and remove the duplicated items? For example, users may set the variable this way:
set @@ tidb_isolation_read_engines = "tiflash, tikv, tiflash, tikv";
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.
Done.
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
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
/run-all-tests |
@lzmhhh123 merge failed. |
/merge |
/run-all-tests |
@lzmhhh123 merge failed. |
/run-mybatis-test |
/merge |
/run-all-tests |
@lzmhhh123 merge failed. |
/run-unit-test |
@@ -734,9 +734,9 @@ func (e *Explain) explainPlanInRowFormat(p Plan, taskType, indent string, isLast | |||
var storeType string | |||
switch x.StoreType { |
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 call Name directly?
What problem does this PR solve?
Support isolation read by engine type.
What is changed and how it works?
Filter access paths by engine type after getting all possible access paths.
Check List
Tests
Code changes
Side effects