[#586] Fix writecache benchmarks and refactor hacky NeedsCompression
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
023b90342c
commit
8f994163ee
17 changed files with 161 additions and 92 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/common"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/util/logicerr"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/tracing"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
@ -72,11 +71,3 @@ func (b *BlobStor) Put(ctx context.Context, prm common.PutPrm) (common.PutRes, e
|
|||
|
||||
return common.PutRes{}, ErrNoPlaceFound
|
||||
}
|
||||
|
||||
// NeedsCompression returns true if the object should be compressed.
|
||||
// For an object to be compressed 2 conditions must hold:
|
||||
// 1. Compression is enabled in settings.
|
||||
// 2. Object MIME Content-Type is allowed for compression.
|
||||
func (b *BlobStor) NeedsCompression(obj *objectSDK.Object) bool {
|
||||
return b.cfg.compression.NeedsCompression(obj)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue