[#1745] neofs-node: Remove memcache_capacity from the configuration

It is unused since ddaed283e9 .

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-09-01 09:03:01 +03:00 committed by fyrchik
parent bda084f331
commit 177e8e01b1
11 changed files with 5 additions and 45 deletions

View file

@ -65,7 +65,7 @@ func testShardGetRange(t *testing.T, hasWriteCache bool) {
}
sh := newCustomShard(t, t.TempDir(), hasWriteCache,
[]writecache.Option{writecache.WithMaxMemSize(0), writecache.WithMaxObjectSize(writeCacheMaxSize)},
[]writecache.Option{writecache.WithMaxObjectSize(writeCacheMaxSize)},
[]blobstor.Option{blobstor.WithStorages([]blobstor.SubStorage{
{
Storage: blobovniczatree.NewBlobovniczaTree(

View file

@ -35,7 +35,7 @@ func (s epochState) CurrentEpoch() uint64 {
func newShard(t testing.TB, enableWriteCache bool) *shard.Shard {
return newCustomShard(t, t.TempDir(), enableWriteCache,
[]writecache.Option{writecache.WithMaxMemSize(0)},
nil,
nil)
}

View file

@ -19,9 +19,6 @@ type options struct {
blobstor *blobstor.BlobStor
// metabase is the metabase instance.
metabase *meta.DB
// maxMemSize is the maximum total size of all objects cached in memory.
// 1 GiB by default.
maxMemSize uint64
// maxObjectSize is the maximum size of the object stored in the write-cache.
maxObjectSize uint64
// smallObjectSize is the maximum size of the object stored in the database.
@ -67,13 +64,6 @@ func WithMetabase(db *meta.DB) Option {
}
}
// WithMaxMemSize sets maximum size for in-memory DB.
func WithMaxMemSize(sz uint64) Option {
return func(o *options) {
o.maxMemSize = sz
}
}
// WithMaxObjectSize sets maximum object size to be stored in write-cache.
func WithMaxObjectSize(sz uint64) Option {
return func(o *options) {

View file

@ -66,10 +66,9 @@ type objectInfo struct {
}
const (
maxInMemorySizeBytes = 1024 * 1024 * 1024 // 1 GiB
maxObjectSize = 64 * 1024 * 1024 // 64 MiB
smallObjectSize = 32 * 1024 // 32 KiB
maxCacheSizeBytes = 1 << 30 // 1 GiB
maxObjectSize = 64 * 1024 * 1024 // 64 MiB
smallObjectSize = 32 * 1024 // 32 KiB
maxCacheSizeBytes = 1 << 30 // 1 GiB
)
var (
@ -85,7 +84,6 @@ func New(opts ...Option) Cache {
compressFlags: make(map[string]struct{}),
options: options{
log: zap.NewNop(),
maxMemSize: maxInMemorySizeBytes,
maxObjectSize: maxObjectSize,
smallObjectSize: smallObjectSize,
workersCount: defaultFlushWorkersCount,