-
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
UCP: util/memory: fix misleading log information when spilling to disk #15467
Conversation
util/memory/tracker.go
Outdated
t.mu.children[i].toString(indent+" ", buffer) | ||
t.mu.children[i].bytesLimit = tmp |
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.
Hi,
I think it's not necessary to change this method, we can just print the Consumed and Limit memory of the Tracker itself.
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.
Actually I think so too, the code I changed is too ugly
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.
TestSetDDLErrorCountLimit success on my own machine...
util/chunk/row_container.go
Outdated
} | ||
fmt.Fprintf(buffer, "%s \"consumed\": %s\n", "", t.BytesToString(t.BytesConsumed())) | ||
buffer.WriteString("}\n") | ||
logutil.BgLogger().Info("memory exceeds quota, spill to disk now.", zap.String("memory", buffer.String())) |
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.
logutil.BgLogger().Info("memory exceeds quota, spill to disk now.", zap.String("memory", buffer.String())) | |
logutil.BgLogger().Info("memory exceeds quota, spill to disk now.", zap.Int64("qonsumed", t.BytesConsumed()), zap.Int64("quota", t.GetBytesLimit())) |
We can just print the plain text instead of constructing JSON.
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.
s/qonsumed/consumed/?
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.
sorry about that.
@yzwqf Please fix this typo.
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 |
What problem does this PR solve?
close #15401
What is changed and how it works?
Hide the unrelated quotas as the issue says.
Check List
Tests