Skip to content

Conversation

@meiji163
Copy link
Contributor

@meiji163 meiji163 commented Oct 8, 2023

Description

This PR addresses a situation where TIMESTAMP fields can be corrupted. Quoting @dm-2:

gh-ost is incorrectly modifying the timezone of timestamp fields of rows when the following criteria are met:

  • database is running in non-UTC timezone, and
  • row is changed whilst a migration is running, and
  • field is timestamp, and
  • field contains a non-UTC timestamp

This is caused by how go-mysql/replication package parses binlog timestamps based on timezone. In the latest release this behaviour was disabled by editing the vendored package 7e0bdbe , but in the master branch it is enabled.

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

@meiji163 meiji163 requested a review from rashiq October 9, 2023 03:34
@meiji163
Copy link
Contributor Author

meiji163 commented Oct 10, 2023

This has run successfully on testing replicas on 175 production tables total, so I am fairly confident to merge.

@meiji163 meiji163 merged commit 03f7fc8 into master Oct 10, 2023
@timvaillancourt
Copy link
Collaborator

@meiji163 I'm so glad someone finally figured this out and it's great it didn't require modifying vendored code. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants