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

K8SPXC-1502: Fix additional pitr azure newline issue #1842

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/pitr/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ func (c *Collector) CollectBinLogs(ctx context.Context) error {

for _, gtidSet := range lastGTIDSetList {
sourceID := strings.Split(gtidSet, ":")[0]

// remove any newline characters from the set name
sourceID = strings.ReplaceAll(sourceID, "\n", "")
sourceID = strings.ReplaceAll(sourceID, "\r", "")

c.lastUploadedSet, err = c.lastGTIDSet(ctx, sourceID)
if err != nil {
return errors.Wrap(err, "get last uploaded gtid set")
Expand Down Expand Up @@ -502,7 +507,7 @@ func (c *Collector) manageBinlog(ctx context.Context, binlog pxc.Binlog) (err er
// nolint:errcheck
setBuffer.WriteString(binlog.GTIDSet.Raw())

lastSetName := lastSetFilePrefix+strings.Split(gtidSet, ":")[0]
lastSetName := lastSetFilePrefix + strings.Split(gtidSet, ":")[0]

// remove any newline characters from the last set name
lastSetName = strings.ReplaceAll(lastSetName, "\n", "")
Expand Down
Loading