-
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
*: show memory usage in "show processlist" #6266
Conversation
CI failed |
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.
reset LGTM
/run-all-tests |
@@ -1380,6 +1380,7 @@ func (s *session) ShowProcess() util.ProcessInfo { | |||
tmp := s.processInfo.Load() | |||
if tmp != nil { | |||
pi = tmp.(util.ProcessInfo) | |||
pi.Mem = s.GetSessionVars().StmtCtx.MemTracker.BytesConsumed() |
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.
Could we do it in SetProcessInfo
?
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.
No we can not. Memory usage is dynamically changed value, we should calculate the memory usage when "show processlist" is called not when a query is being executed.
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
after this PR: