From 271a5b4120f08089379aa5040a635782610cd9bf Mon Sep 17 00:00:00 2001 From: Slach Date: Fri, 30 Aug 2024 11:14:54 +0500 Subject: [PATCH] fix unnecessary warnings in `allow_object_disk_streaming: true` behavior during restore --- ChangeLog.md | 4 ++++ pkg/backup/restore.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 9a6cf4d6..777d1aa5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +# v2.6.1 (not released yet) +BUG FIXES +- fix unnecessary warnings in `allow_object_disk_streaming: true` behavior during restore + # v2.6.0 IMPROVEMENTS - add `rbac-only` and `configs-only` parameters to `POST /backup/create` and `POST /backup/restore` API calls diff --git a/pkg/backup/restore.go b/pkg/backup/restore.go index 48d22956..817b68bf 100644 --- a/pkg/backup/restore.go +++ b/pkg/backup/restore.go @@ -1398,6 +1398,8 @@ func (b *Backuper) downloadObjectDiskParts(ctx context.Context, backupName strin start := time.Now() downloadObjectDiskPartsWorkingGroup, downloadCtx := errgroup.WithContext(ctx) downloadObjectDiskPartsWorkingGroup.SetLimit(int(b.cfg.General.ObjectDiskServerSideCopyConcurrency)) + var isCopyFailed atomic.Bool + isCopyFailed.Store(false) for _, part := range parts { dstDiskName := diskName if part.RebalancedDisk != "" { @@ -1414,8 +1416,6 @@ func (b *Backuper) downloadObjectDiskParts(ctx context.Context, backupName strin return 0, findRecursiveErr } } - var isCopyFailed atomic.Bool - isCopyFailed.Store(false) walkErr := filepath.Walk(partPath, func(fPath string, fInfo fs.FileInfo, err error) error { if err != nil { return err