Skip to content

Conversation

@percona-csalguero
Copy link
Contributor

Added a new storage pkg and tests to handle different kinds of storages
in PBM

Added a new storage pkg and tests to handle different kinds of storages
in PBM
- Added storage pkg
- Modified client to use the storage
- Updated tests
- Fixed error in backup writer (missing close pipe upon finishing)
- New reader pkg
- Minio support
StorageName: bm.GetStorageName(),
}
source.Client.restoreBackup(msg)
source.Client.RestoreBackup(msg)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error return value of source.Client.RestoreBackup is not checked (from errcheck)

str := strings.Repeat("a", int(chunkSize))
size := int64(0)
for {
bw.Write([]byte(str))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error return value of bw.Write is not checked (from errcheck)

return
}
buf := make([]byte, 16*1024*1024)
br.bytesRead, err = io.CopyBuffer(pw, result.Body, buf)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ineffectual assignment to err (from ineffassign)


rs1OplogFilename := fmt.Sprintf("%s_rs1.oplog", backupNamePrefix)
rs1LocalFilename := path.Join(os.TempDir(), rs1OplogFilename)
rs1File, err := os.Create(rs1LocalFilename)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ineffectual assignment to err (from ineffassign)


rs2OplogFilename := fmt.Sprintf("%s_rs2.oplog", backupNamePrefix)
rs2LocalFilename := path.Join(os.TempDir(), rs2OplogFilename)
rs2File, err := os.Create(rs2LocalFilename)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ineffectual assignment to err (from ineffassign)

@percona-csalguero percona-csalguero changed the title [WIP] Do not merge PBM-88 PBM-162 Added storage pkg PBM-88 PBM-162 Added storage pkg Jan 23, 2019
@percona-csalguero percona-csalguero merged commit 5e7f583 into master Jan 23, 2019
percona-csalguero added a commit that referenced this pull request Jan 23, 2019
This reverts commit 5e7f583, reversing
changes made to f99a8c4.
@timvaillancourt timvaillancourt deleted the PBM-88 branch February 15, 2019 14:00
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.

3 participants