writecache: Drop unused #1359

Merged
acid-ant merged 1 commit from dstepanov-yadro/frostfs-node:fix/wc_drop_compressed into master 2024-09-10 06:15:19 +00:00
2 changed files with 0 additions and 13 deletions

View file

@ -18,16 +18,9 @@ import (
type cache struct { type cache struct {
options options
// mtx protects statistics, counters and compressFlags.
mtx sync.RWMutex
mode mode.Mode mode mode.Mode
modeMtx sync.RWMutex modeMtx sync.RWMutex
// compressFlags maps address of a big object to boolean value indicating
// whether object should be compressed.
compressFlags map[string]struct{}
// flushCh is a channel with objects to flush. // flushCh is a channel with objects to flush.
flushCh chan objectInfo flushCh chan objectInfo
// cancel is cancel function, protected by modeMtx in Close. // cancel is cancel function, protected by modeMtx in Close.
@ -66,7 +59,6 @@ func New(opts ...Option) Cache {
flushCh: make(chan objectInfo), flushCh: make(chan objectInfo),
mode: mode.Disabled, mode: mode.Disabled,
compressFlags: make(map[string]struct{}),
options: options{ options: options{
log: &logger.Logger{Logger: zap.NewNop()}, log: &logger.Logger{Logger: zap.NewNop()},
maxObjectSize: defaultMaxObjectSize, maxObjectSize: defaultMaxObjectSize,

View file

@ -115,11 +115,6 @@ func (c *cache) putBig(ctx context.Context, addr string, prm common.PutPrm) erro
return err return err
} }
if compressor := c.blobstor.Compressor(); compressor != nil && compressor.NeedsCompression(prm.Object) {
c.mtx.Lock()
c.compressFlags[addr] = struct{}{}
c.mtx.Unlock()
}
storagelog.Write(c.log, storagelog.Write(c.log,
storagelog.AddressField(addr), storagelog.AddressField(addr),
storagelog.StorageTypeField(wcStorageType), storagelog.StorageTypeField(wcStorageType),