-
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
parser, ddl: update the DDL job's Location structure #31199
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
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
@@ -211,7 +211,13 @@ type DDLReorgMeta struct { | |||
SQLMode mysql.SQLMode `json:"sql_mode"` | |||
Warnings map[errors.ErrorID]*terror.Error `json:"warnings"` | |||
WarningsCount map[errors.ErrorID]int64 `json:"warnings_count"` | |||
Location *time.Location `json:"time_location"` | |||
Location *TimeZone `json:"time_zone"` |
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.
Would it break the compatibility?
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, I looked at the original PR that added this field that is not on the branch yet.
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.
Which PR?
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.
PR:#29664
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.
Need an issue
@@ -211,7 +211,13 @@ type DDLReorgMeta struct { | |||
SQLMode mysql.SQLMode `json:"sql_mode"` | |||
Warnings map[errors.ErrorID]*terror.Error `json:"warnings"` | |||
WarningsCount map[errors.ErrorID]int64 `json:"warnings_count"` | |||
Location *time.Location `json:"time_location"` | |||
Location *TimeZone `json:"time_zone"` |
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.
Where do you set it at?
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 will set it in the next PR(There are a lot of problems involved in this PR, so I will fix this problem first
).
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.
But I don't know what you want to fix and don't know if it works.
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.
It describes the problems we need to deal with: “The Location
in the job is empty after decoding”. It was also written in the original PR of worker to be dealt with.
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 mean the problem from the user's perspective.
“The Location in the job is empty after decoding”, Sounds like a problem, but what would happen? I'm still confused.
Besides, why it's empty after decoding? And Why using Name
and Offset
can fix 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.
Because the Location object's fields are all lowercase, there are no useful fields after decoding. I'll add this to the description.
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.
Ok, I get it. Please add an issue for this PR.
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.
@wjhuang2016 Done.
CI failed for:
|
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 00b5d10
|
/run-check_dev |
/run-check_dev_2 |
/run-unit-test |
/merge |
/run-unit-tests |
/merge |
/run-mysql-test |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/1446077a431247da335c862084f610342c017468 |
/run-unit-test |
/merge |
/run-unit-test |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.4 in PR #31263 |
What problem does this PR solve?
Issue Number: close #31212
Problem Summary:
The Location in the job is empty after decoding.
What is changed and how it works?
Because the
Location
object's fields are all lowercase, there are no useful fields after json decoding. So, useName
andOffset
instead ofLocation
to represent timezone.Check List
Tests
Side effects
Documentation
Release note