[#9999] writecache: Drop unused
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m37s
DCO action / DCO (pull_request) Successful in 2m33s
Vulncheck / Vulncheck (pull_request) Successful in 3m32s
Tests and linters / Staticcheck (pull_request) Successful in 3m52s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m7s
Tests and linters / Lint (pull_request) Successful in 4m15s
Tests and linters / gopls check (pull_request) Successful in 6m1s
Build / Build Components (pull_request) Successful in 6m19s
Tests and linters / Tests (pull_request) Successful in 7m35s
Tests and linters / Tests with -race (pull_request) Successful in 7m39s
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m37s
DCO action / DCO (pull_request) Successful in 2m33s
Vulncheck / Vulncheck (pull_request) Successful in 3m32s
Tests and linters / Staticcheck (pull_request) Successful in 3m52s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m7s
Tests and linters / Lint (pull_request) Successful in 4m15s
Tests and linters / gopls check (pull_request) Successful in 6m1s
Build / Build Components (pull_request) Successful in 6m19s
Tests and linters / Tests (pull_request) Successful in 7m35s
Tests and linters / Tests with -race (pull_request) Successful in 7m39s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
4668efc0bf
commit
91d6f11792
2 changed files with 0 additions and 13 deletions
|
@ -18,16 +18,9 @@ import (
|
|||
type cache struct {
|
||||
options
|
||||
|
||||
// mtx protects statistics, counters and compressFlags.
|
||||
mtx sync.RWMutex
|
||||
|
||||
mode mode.Mode
|
||||
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 chan objectInfo
|
||||
// cancel is cancel function, protected by modeMtx in Close.
|
||||
|
@ -66,7 +59,6 @@ func New(opts ...Option) Cache {
|
|||
flushCh: make(chan objectInfo),
|
||||
mode: mode.Disabled,
|
||||
|
||||
compressFlags: make(map[string]struct{}),
|
||||
options: options{
|
||||
log: &logger.Logger{Logger: zap.NewNop()},
|
||||
maxObjectSize: defaultMaxObjectSize,
|
||||
|
|
|
@ -115,11 +115,6 @@ func (c *cache) putBig(ctx context.Context, addr string, prm common.PutPrm) erro
|
|||
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.AddressField(addr),
|
||||
storagelog.StorageTypeField(wcStorageType),
|
||||
|
|
Loading…
Reference in a new issue