-
Notifications
You must be signed in to change notification settings - Fork 202
K8SPXC-992 prevent binlog collision #2260
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
Conversation
cmd/pitr/collector/collector.go
Outdated
| "context" | ||
| "crypto/md5" | ||
| "fmt" | ||
| "golang.org/x/sys/unix" |
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.
this needs to be in 2nd import group
cmd/pitr/collector/collector.go
Outdated
| "github.com/pkg/errors" | ||
| "github.com/prometheus/client_golang/prometheus" |
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.
these need to be in 2nd import group
|
@nmarukovich please add description to your PR |
…ona/percona-xtradb-cluster-operator into K8SPXC-992_prevent_binlog_collision
commit: a2c7ae0 |
CHANGE DESCRIPTION
Problem:
Currently the binlog collector renames binlog files to something like
"binlog_1649235295_ad36c3caac21832e0b1f4e08fbdca564". The timestamp comes fromget_first_record_timestamp_by_binlogUDF described in docand "ad36c3caac21832e0b1f4e08fbdca564" is the md5 hash of the GTID set.
This can lead to having two binlogs with same timestamp (due to a small value for max_binlog_size, starting multiple big transactions at the same time etc.) and make ordering the logs impossible.
To fix the issue we'll preserve the incremental number from the file name and have filename like this: "
binlog_1649235295_000001_ad36c3caac21832e0b1f4e08fbdca564"In the task we update the binlog name that we send to storage.
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
compare/*-oc.yml)?Config/Logging/Testability