From f7bfa9b322896663e5b1e68bb9fe63ff097362d8 Mon Sep 17 00:00:00 2001 From: "rita.canavarro" Date: Wed, 19 Jul 2023 12:57:47 +0100 Subject: [PATCH] [FIX] Function issues Signed-off-by: rita.canavarro --- pkg/shipper/shipper.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/shipper/shipper.go b/pkg/shipper/shipper.go index 35782373718..8c567d16040 100644 --- a/pkg/shipper/shipper.go +++ b/pkg/shipper/shipper.go @@ -333,7 +333,6 @@ func (s *Shipper) Sync(ctx context.Context) (uploaded int, err error) { meta.Uploaded = append(meta.Uploaded, m.ULID) uploaded++ s.metrics.uploads.Inc() - s.metrics.uploadedBytes(m.) } if err := WriteMetaFile(s.logger, s.dir, meta); err != nil { level.Warn(s.logger).Log("msg", "updating meta file failed", "err", err) @@ -387,11 +386,13 @@ func (s *Shipper) upload(ctx context.Context, meta *metadata.Meta) error { return errors.Wrap(err, "write meta file") } - if block.Upload(ctx, s.logger, s.bucket, updir, s.hashFunc) != nil{ + err := block.Upload(ctx, s.logger, s.bucket, updir, s.hashFunc) + + if err != nil { return errors.Wrap(err, "while upploading the block") } - files, err := block.GatherFileStats() + files, err := block.GatherFileStats(updir, s.hashFunc, s.logger) if err != nil { //The block upload should not stop due to issues gathering data for a metric