-
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
ddl, metrics: add worker info to the log #7201
Conversation
/run-all-tests |
} | ||
|
||
// start is used for async online schema changing, it will try to become the owner firstly, | ||
// then wait or pull the job queue to handle a schema change job. | ||
func (w *worker) start(d *ddlCtx) { | ||
log.Infof("[ddl] start DDL worker %s", w) | ||
log.Infof("[ddl-%s] start DDL worker", w) |
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.
I think keeping the previous format is better. What is the difference?
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.
[ddl] -> [ddl-worker 0, tp general]
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.
So what is the problem with the previous log?
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.
Other places need to add [ddl-worker 0, tp general]
. I want to unify the log, so do it.
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
@@ -91,7 +91,7 @@ var ( | |||
}, []string{LblType, LblResult}) | |||
|
|||
CreateDDLInstance = "create_ddl_instance" | |||
CreateDDLWorker = "create_ddl_worker" | |||
CreateDDL = "create_ddl" |
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.
Why change this.
LGTM |
1 similar comment
LGTM |
What have you changed? (mandatory)
Add worker info to the log.
[ddl] -> [ddl-worker 0, tp general]
What is the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
No.
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
No.
Does this PR affect tidb-ansible update? (mandatory)
No.
Does this PR need to be added to the release notes? (mandatory)
No.
Refer to a related PR or issue link (optional)
Benchmark result if necessary (optional)
Add a few positive/negative examples (optional)