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

feat: add threads parameter to openGauss restore subcommand #465

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pitr/agent/internal/handler/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func Restore(ctx *fiber.Ctx) (err error) {
}()

// restore data from backup
if err = pkg.OG.Restore(in.DnBackupPath, in.Instance, in.DnBackupID); err != nil {
if err = pkg.OG.Restore(in.DnBackupPath, in.Instance, in.DnBackupID, in.DnThreadsNum); err != nil {
efmt := "pkg.OG.Restore failure[path=%s,instance=%s,backupID=%s], err wrap: %w"
err = fmt.Errorf(efmt, in.DnBackupPath, in.Instance, in.DnBackupID, err)
status = "restore failure"
Expand Down
1 change: 1 addition & 0 deletions pitr/agent/internal/handler/view/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type RestoreIn struct {
Instance string `json:"instance"`
DnBackupPath string `json:"dn_backup_path"`
DnBackupID string `json:"dn_backup_id"`
DnThreadsNum uint8 `json:"dn_threads_num"`
}

//nolint:dupl
Expand Down
229 changes: 114 additions & 115 deletions pitr/agent/internal/pkg/mocks/opengauss.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading