Skip to content
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

The Location in the DDL job is empty after decoding. #31212

Closed
zimulala opened this issue Dec 31, 2021 · 1 comment · Fixed by #31199
Closed

The Location in the DDL job is empty after decoding. #31212

zimulala opened this issue Dec 31, 2021 · 1 comment · Fixed by #31199
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@zimulala
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Because the Job.Location object's fields are all lowercase, there are no useful fields after json decoding.

	job := &Job{
...
		ReorgMeta: &DDLReorgMeta{
			Location: time.Now().In(time.UTC).Location(),
		},
	}

job.Encode(false)
newJob := &Job{}
err = newJob.Decode(b)

2. What did you expect to see? (Required)

Hopefully, it has data innewJob.ReorgMeta.Location.

3. What did you see instead (Required)

No data.

4. What is your TiDB version? (Required)

Release Version: v5.4.0-alpha-571-g7f8509169
Edition: Community
Git Commit Hash: 7f85091
Git Branch: master
UTC Build Time: 2021-12-31 00:08:39

@github-actions
Copy link

github-actions bot commented Jan 3, 2022

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants