-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
statistics: log the db name #49011
statistics: log the db name #49011
Conversation
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Test locally:
|
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.
🔢 Self-check
pkg/statistics/handle/ddl/ddl.go
Outdated
@@ -125,9 +130,12 @@ func (h *ddlHandlerImpl) HandleDDLEvent(t *util.DDLEvent) error { | |||
// Get the count and modify count of the partition. | |||
stats := h.statsHandler.GetPartitionStats(globalTableInfo, def.ID) | |||
if stats.Pseudo { | |||
is := h.ctx.GetDomainInfoSchema().(infoschema.InfoSchema) |
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.
Usually, this won't happen, so putting the getting scheme operation inside the if statement is OK.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #49011 +/- ##
================================================
+ Coverage 70.9775% 72.4646% +1.4870%
================================================
Files 1368 1391 +23
Lines 404391 411693 +7302
================================================
+ Hits 287027 298332 +11305
+ Misses 97368 94539 -2829
+ Partials 19996 18822 -1174
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Tested again:
|
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
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.
🔢 Self-check
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qw4990, time-and-fate The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/retest |
What problem does this PR solve?
Issue Number: ref #48929 (comment)
Problem Summary:
What changed and how does it work?
Printed the DB name in the logs.
Because changing the interface would have a significant invasive impact, the ctx was attached to the DDL handler. Otherwise, not only all the tests but also the handle's flush operation would have to query the schema by themselves.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.