Skip to content

Commit

Permalink
[FIX] Function issues
Browse files Browse the repository at this point in the history
Signed-off-by: rita.canavarro <[email protected]>
  • Loading branch information
rita.canavarro committed Jul 19, 2023
1 parent 69618fc commit b20aa3e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/shipper/shipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b20aa3e

Please sign in to comment.