Skip to content

Commit

Permalink
*: adjust message type
Browse files Browse the repository at this point in the history
Signed-off-by: BornChanger <[email protected]>
  • Loading branch information
BornChanger committed Sep 4, 2023
1 parent e9df8b4 commit e44e774
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions cmd/backup-manager/app/util/backup_size.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,7 @@ func calculateSnapshotSize(volumeId, snapshotId string) (uint64, uint64, error)

start := time.Now()

<<<<<<< HEAD
klog.Infof("start to calculate snapshot size for %s, volume id %s",
=======
klog.Infof("start to calculate snapshot size for %s, base on snapshot %s, volume id %s",
>>>>>>> 7bd164825 (ebs br: add retry support for ListSnapshotBlocks() and ListChangedBlocks())
snapshotId, volumeId)

ebsSession, err := util.NewEBSSession(util.CloudAPIConcurrency)
Expand Down Expand Up @@ -251,7 +247,7 @@ func calculateSnapshotSize(volumeId, snapshotId string) (uint64, uint64, error)
}

isRetry := func(err error) bool {
klog.V(4).Infof("calc snapshot size hit error %s", err.Error())
klog.Warningf("calc snapshot size hit error %s", err.Error())
return !strings.Contains(err.Error(), "RequestThrottledException")
}
err = retry.OnError(backoff, isRetry, listBlocks)
Expand Down Expand Up @@ -333,7 +329,7 @@ func calculateChangedBlocksSize(volumeId, preSnapshotId, snapshotId string) (uin
}

isRetry := func(err error) bool {
klog.V(4).Infof("calc snapshot size hit error %s", err.Error())
klog.Warningf("calc snapshot size hit error %s", err.Error())
return !strings.Contains(err.Error(), "RequestThrottledException")
}
err = retry.OnError(backoff, isRetry, listChangeBlocks)
Expand All @@ -351,10 +347,7 @@ func calculateChangedBlocksSize(volumeId, preSnapshotId, snapshotId string) (uin

klog.Infof("incremental snapshot size %s, num of api ListChangedBlocks request %d, snapshot id %s, volume id %s, takes %v",
humanize.Bytes(snapshotSize), numApiReq, snapshotId, volumeId, elapsed)
<<<<<<< HEAD

=======
>>>>>>> 7bd164825 (ebs br: add retry support for ListSnapshotBlocks() and ListChangedBlocks())
return snapshotSize, numApiReq, nil
}

Expand Down

0 comments on commit e44e774

Please sign in to comment.