Skip to content

Commit

Permalink
cli: add warning for duplicated index files in upload-bin
Browse files Browse the repository at this point in the history
As we are not afraid of duplicates this is not a critical error anymore.
BlockFetcher will take the first returned by search.

Close #3762

Signed-off-by: Ekaterina Pavlova <[email protected]>
  • Loading branch information
AliceInHunterland committed Dec 17, 2024
1 parent 24f81a7 commit 33f4361
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cli/util/upload_bin.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,7 @@ func searchIndexFile(ctx *cli.Context, p poolWrapper, containerID cid.ID, privKe
for range indexIDs {
count++
if count > 1 {
select {
case errCh <- fmt.Errorf("duplicated index file %d found", i):
default:
}
return
fmt.Fprintf(ctx.App.Writer, "WARN: For index %d found %d index files\n", i, count)
}
}
if count == 0 {
Expand Down

0 comments on commit 33f4361

Please sign in to comment.