Skip to content

Commit

Permalink
fix: backup progress should not add block failed to upload to success…
Browse files Browse the repository at this point in the history
…ful count

Longhorn 9791

Signed-off-by: Derek Su <[email protected]>
  • Loading branch information
derekbit committed Nov 12, 2024
1 parent b5b0e72 commit b405e8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backupbackingimage/backupbackingimage.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ func backupMapping(bsDriver backupstore.BackupStoreDriver,
return err
}

return bsDriver.Write(blkFile, rs)
err = bsDriver.Write(blkFile, rs)
return err
}

// isBlockBeingProcessed check if the block is being processed by other goroutine and prevent redundant work
Expand Down
3 changes: 2 additions & 1 deletion deltablock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit b405e8f

Please sign in to comment.