From b20aa3e30d890cfaad90d806a5dcc87b1e141347 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 16494aaeae0..5157d074a6d 100644 --- a/pkg/shipper/shipper.go +++ b/pkg/shipper/shipper.go @@ -341,7 +341,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) @@ -397,11 +396,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