-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
executor: trace and control memory usage in DistSQL layer #10003
Conversation
/rebuild |
Codecov Report
@@ Coverage Diff @@
## master #10003 +/- ##
===============================================
+ Coverage 77.489% 77.5252% +0.0361%
===============================================
Files 403 403
Lines 81898 81954 +56
===============================================
+ Hits 63462 63535 +73
+ Misses 13723 13706 -17
Partials 4713 4713 |
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 |
1 similar comment
/run-all-tests |
/rebuild |
/run-all-tests |
2 similar comments
/run-all-tests |
/run-all-tests |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
/run-all-tests |
All CI problems have been fixed, PTAL~ |
What problem does this PR solve?
TiDB only traces and controls memory used in Executor layer now.
Some operators in DistSQL layer like
selectResult
andcopIterator
also have their own buffer that may use a lot of memory.Memory usage in these operators should be traced and controlled by
MemTracker
.What is changed and how it works?
Introduce a new field
MemTracker
inkv.Request
to let operators in DistSQL layer use to trace and control memory usage.For simplification, this PR only support tracing DistSQL operators created by
TableReader
,IndexReader
andIndexLookup
.DistSQL operators created by
Analyze
will be supported by an another PR.Check List
Tests