-
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
*: support read tidb cluster memory table #13065
Conversation
Merge remote-tracking branch 'twz/hackathon' into hackathon
/run-all-tests |
IMO, the |
/run-all-tests |
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
It's used to distinguish to MySQL system table (But you are right, maybe we don't need this prefix and should remove this prefix). |
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.
Rest 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
/merge |
/run-all-tests |
@crazycs520 merge failed. |
/run-integration-compatibility-test |
/run-check_dev_2 |
/run-all-tests |
/run-unit_test |
/test |
/run-all-tests |
What problem does this PR solve?
*support read tidb cluster memory table in TiDB. This comes from PingCAP hackathon 2019.
Demo
cop[tidbs_mem]
means the table was stored in the all tidb server memory. And we can push theStreamAgg
executor to another TiDB coprocessor to distributed execution, Just like TiKV.What is changed and how it works?
Architecture
executor
.tipb.TableScan
to read memory table.tipb.TableScan
use table id to locate table, and before this PR, the memory table id maybe not same with another tidb nodes, because the memory table id was allocated in local. So this PR also allocates a constant id for system schema/table.TiDB coprocessor work flow
Attension
Since TiDB coprocessor reuses the TiDB
executor
, but the tidb aggregation executor is a little different from coprocessor aggregation executor:TiDB aggregation executor won't out the group by value, but coprocessor aggregation executor does. So we need a special physical plan for TiDB coprocessor when
TiDB coprocessor aggregation executor was used. We need to add
firstrow
for everygroup by
expression, then the TiDB coprocessor aggregation executor will output the group by value.Check List
Tests
Code changes
Side effects
Related changes
Release note