From 70b94cf07d5f45147d71ec5ec3bba88218e2151c Mon Sep 17 00:00:00 2001 From: Derek Su Date: Tue, 12 Nov 2024 23:40:24 +0800 Subject: [PATCH] fix: backup progress should not add block failed to upload to successful count Longhorn 9791 Signed-off-by: Derek Su --- deltablock.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deltablock.go b/deltablock.go index edb237cd7..6c14ba49d 100644 --- a/deltablock.go +++ b/deltablock.go @@ -425,7 +425,8 @@ func backupBlock(bsDriver BackupStoreDriver, config *DeltaBackupConfig, return errors.Wrapf(err, "failed to get transfer data size during saving blocks") } - if err := bsDriver.Write(blkFile, rs); err != nil { + err = bsDriver.Write(blkFile, rs) + if err != nil { return errors.Wrapf(err, "failed to write data during saving blocks") }