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
|
@ -16,7 +16,6 @@ type cfg struct {
|
|||
readOnly bool
|
||||
rootPath string
|
||||
openedCacheSize int
|
||||
openedCacheTTL time.Duration
|
||||
blzShallowDepth uint64
|
||||
blzShallowWidth uint64
|
||||
blzLeafWidth uint64
|
||||
|
@ -35,7 +34,6 @@ type Option func(*cfg)
|
|||
const (
|
||||
defaultPerm = 0o700
|
||||
defaultOpenedCacheSize = 50
|
||||
defaultOpenedCacheTTL = 0 // means expiring is off
|
||||
defaultBlzShallowDepth = 2
|
||||
defaultBlzShallowWidth = 16
|
||||
defaultWaitBeforeDropDB = 10 * time.Second
|
||||
|
@ -48,7 +46,6 @@ func initConfig(c *cfg) {
|
|||
log: &logger.Logger{Logger: zap.L()},
|
||||
perm: defaultPerm,
|
||||
openedCacheSize: defaultOpenedCacheSize,
|
||||
openedCacheTTL: defaultOpenedCacheTTL,
|
||||
blzShallowDepth: defaultBlzShallowDepth,
|
||||
blzShallowWidth: defaultBlzShallowWidth,
|
||||
reportError: func(string, error) {},
|
||||
|
@ -108,12 +105,6 @@ func WithOpenedCacheSize(sz int) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func WithOpenedCacheTTL(ttl time.Duration) Option {
|
||||
return func(c *cfg) {
|
||||
c.openedCacheTTL = ttl
|
||||
}
|
||||
}
|
||||
|
||||
func WithObjectSizeLimit(sz uint64) Option {
|
||||
return func(c *cfg) {
|
||||
c.blzOpts = append(c.blzOpts, blobovnicza.WithObjectSizeLimit(sz))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue