Skip to content

Commit

Permalink
fix: review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill committed Feb 26, 2024
1 parent cf58df0 commit ad5cb98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/check/datadurability/datadurability.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"context"
"fmt"
"io"
"net/http"
"slices"
"sync"
"time"
Expand Down Expand Up @@ -105,7 +106,7 @@ func (c *Check) Run(ctx context.Context, cluster orchestration.Cluster, o interf
chunkStart := time.Now()
for retry := 0; retry < opts.RetryAttempts; retry++ {
d, err = node.Client().DownloadChunk(ctx, ref, "", &api.DownloadOptions{Cache: &cache})
if err == nil {
if err == nil || api.IsHTTPStatusErrorCode(err, http.StatusNotFound) {
break
}
c.logger.Debugf("download failed. %s (%d of %d). retry=%d chunk=%s node=%s err=%v", percentage(i, len(chunkRefs)), i, len(chunkRefs), retry, ref, node.Name(), err)
Expand Down

0 comments on commit ad5cb98

Please sign in to comment.