[#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
|
@ -112,7 +112,7 @@ func (c *cache) putBig(ctx context.Context, addr string, prm common.PutPrm) erro
|
|||
return err
|
||||
}
|
||||
|
||||
if c.blobstor.NeedsCompression(prm.Object) {
|
||||
if compressor := c.blobstor.Compressor(); compressor != nil && compressor.NeedsCompression(prm.Object) {
|
||||
c.mtx.Lock()
|
||||
c.compressFlags[addr] = struct{}{}
|
||||
c.mtx.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue