From 44ba07cb58d0e8c3e199a257cf84c143e0766a81 Mon Sep 17 00:00:00 2001 From: poyzannur Date: Fri, 5 Jan 2024 13:57:10 +0000 Subject: [PATCH] add missing err check --- pkg/storage/stores/shipper/bloomshipper/client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/storage/stores/shipper/bloomshipper/client.go b/pkg/storage/stores/shipper/bloomshipper/client.go index ebc620a0204f..d5d981cddb9e 100644 --- a/pkg/storage/stores/shipper/bloomshipper/client.go +++ b/pkg/storage/stores/shipper/bloomshipper/client.go @@ -233,7 +233,11 @@ func (b *BloomClient) PutBlocks(ctx context.Context, blocks []Block) ([]Block, e key := createBlockObjectKey(block.Ref) objectClient := b.periodicObjectClients[period] - block.Data.Seek(0, 0) + _, err = block.Data.Seek(0, 0) + if err != nil { + return fmt.Errorf("error uploading block file: %w", err) + } + err = objectClient.PutObject(ctx, key, block.Data) if err != nil { return fmt.Errorf("error uploading block file: %w", err)