Skip to content

Commit

Permalink
fix(backup): don't ignore uploadHost error
Browse files Browse the repository at this point in the history
Fixes #3729
  • Loading branch information
Michal-Leszczynski committed Feb 26, 2024
1 parent c215ad4 commit fa7dccf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/service/backup/worker_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/scylladb/scylla-manager/v3/pkg/util/timeutc"
)

func (w *worker) Snapshot(ctx context.Context, hosts []hostInfo, limits []DCLimit) (err error) {
func (w *worker) Snapshot(ctx context.Context, hosts []hostInfo, limits []DCLimit) (err error) { // nolint: dupl
w.Logger.Info(ctx, "Taking snapshots...")
defer func(start time.Time) {
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions pkg/service/backup/worker_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/scylladb/scylla-manager/v3/pkg/util/timeutc"
)

func (w *worker) Upload(ctx context.Context, hosts []hostInfo, limits []DCLimit) (err error) {
func (w *worker) Upload(ctx context.Context, hosts []hostInfo, limits []DCLimit) (err error) { // nolint: dupl
w.Logger.Info(ctx, "Uploading snapshot files...")
defer func(start time.Time) {
if err != nil {
Expand All @@ -25,7 +25,8 @@ func (w *worker) Upload(ctx context.Context, hosts []hostInfo, limits []DCLimit)

f := func(h hostInfo) error {
w.Logger.Info(ctx, "Uploading snapshot files on host", "host", h.IP)
if err := w.uploadHost(ctx, h); err == nil {
err := w.uploadHost(ctx, h)
if err == nil {
w.Logger.Info(ctx, "Done uploading snapshot files on host", "host", h.IP)
}
return err
Expand Down

0 comments on commit fa7dccf

Please sign in to comment.