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 0b432c4 commit f7bfa9b
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 @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f7bfa9b

Please sign in to comment.