forked from TrueCloudLab/frostfs-node
Revert "[#866] Use TTL for blobovnicza tree cache"
This reverts commit d9cbb16bd3
.
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
46a04463b2
commit
ae5bb87e70
10 changed files with 17 additions and 55 deletions
|
@ -61,7 +61,6 @@ storage:
|
|||
depth: 1 # max depth of object tree storage in key-value DB
|
||||
width: 4 # max width of object tree storage in key-value DB
|
||||
opened_cache_capacity: 50 # maximum number of opened database files
|
||||
opened_cache_ttl: 5m # ttl for opened database file
|
||||
|
||||
gc:
|
||||
remover_batch_size: 200 # number of objects to be removed by the garbage collector
|
||||
|
|
|
@ -182,7 +182,6 @@ type subStorageCfg struct {
|
|||
width uint64
|
||||
leafWidth uint64
|
||||
openedCacheSize int
|
||||
openedCacheTTL time.Duration
|
||||
initWorkerCount int
|
||||
initInAdvance bool
|
||||
}
|
||||
|
@ -302,7 +301,6 @@ func (a *applicationConfiguration) setShardStorageConfig(newConfig *shardCfg, ol
|
|||
sCfg.width = sub.ShallowWidth()
|
||||
sCfg.leafWidth = sub.LeafWidth()
|
||||
sCfg.openedCacheSize = sub.OpenedCacheSize()
|
||||
sCfg.openedCacheTTL = sub.OpenedCacheTTL()
|
||||
sCfg.initWorkerCount = sub.InitWorkerCount()
|
||||
sCfg.initInAdvance = sub.InitInAdvance()
|
||||
case fstree.Type:
|
||||
|
@ -887,7 +885,6 @@ func (c *cfg) getSubstorageOpts(shCfg shardCfg) []blobstor.SubStorage {
|
|||
blobovniczatree.WithBlobovniczaShallowWidth(sRead.width),
|
||||
blobovniczatree.WithBlobovniczaLeafWidth(sRead.leafWidth),
|
||||
blobovniczatree.WithOpenedCacheSize(sRead.openedCacheSize),
|
||||
blobovniczatree.WithOpenedCacheTTL(sRead.openedCacheTTL),
|
||||
blobovniczatree.WithInitWorkerCount(sRead.initWorkerCount),
|
||||
blobovniczatree.WithInitInAdvance(sRead.initInAdvance),
|
||||
blobovniczatree.WithLogger(c.log),
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package blobovniczaconfig
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config"
|
||||
boltdbconfig "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/engine/shard/boltdb"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/blobovniczatree"
|
||||
|
@ -25,9 +23,6 @@ const (
|
|||
// OpenedCacheSizeDefault is a default cache size of opened Blobovnicza's.
|
||||
OpenedCacheSizeDefault = 16
|
||||
|
||||
// OpenedCacheTTLDefault is a default cache ttl of opened Blobovnicza's.
|
||||
OpenedCacheTTLDefault = 0 // means expiring is off
|
||||
|
||||
// InitWorkerCountDefault is a default workers count to initialize Blobovnicza's.
|
||||
InitWorkerCountDefault = 5
|
||||
)
|
||||
|
@ -106,22 +101,6 @@ func (x *Config) OpenedCacheSize() int {
|
|||
return OpenedCacheSizeDefault
|
||||
}
|
||||
|
||||
// OpenedCacheTTL returns the value of "opened_cache_ttl" config parameter.
|
||||
//
|
||||
// Returns OpenedCacheTTLDefault if the value is not a positive number.
|
||||
func (x *Config) OpenedCacheTTL() time.Duration {
|
||||
d := config.DurationSafe(
|
||||
(*config.Config)(x),
|
||||
"opened_cache_ttl",
|
||||
)
|
||||
|
||||
if d > 0 {
|
||||
return d
|
||||
}
|
||||
|
||||
return OpenedCacheTTLDefault
|
||||
}
|
||||
|
||||
// BoltDB returns config instance for querying bolt db specific parameters.
|
||||
func (x *Config) BoltDB() *boltdbconfig.Config {
|
||||
return (*boltdbconfig.Config)(x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue