Skip to content

Commit

Permalink
Remove compression option for backfill_processes file
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseguy committed Jun 18, 2024
1 parent 1b7431a commit 52db9f5
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions common/storage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (s *S3Storage) ReadBackfillProcesses(ctx context.Context) (BackfillProcesse
return BackfillProcesses{}, ErrStorage
}
defer res.Close()
stat, err := res.Stat()
_, err = res.Stat()
if err != nil {
errResponse := minio.ToErrorResponse(err)
if errResponse.Code == "NoSuchKey" {
Expand All @@ -139,14 +139,6 @@ func (s *S3Storage) ReadBackfillProcesses(ctx context.Context) (BackfillProcesse
var reader io.ReadCloser = res
defer reader.Close()

if stat.Metadata.Get("Content-Encoding") == "gzip" {
reader, err = gzip.NewReader(reader)
if err != nil {
s.log.Warn("error creating gzip reader", "err", err)
return BackfillProcesses{}, ErrMarshaling
}
}

var data BackfillProcesses
err = json.NewDecoder(reader).Decode(&data)
if err != nil {
Expand Down

0 comments on commit 52db9f5

Please sign in to comment.