forked from TrueCloudLab/frostfs-node
[#730] node/morph: Use disable_cache
config param
Do not init caches for eACL, containers and netmap if `disable_cache` config options is `true`, use direct RPC calls instead. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
c423aa432a
commit
e8665f6cef
10 changed files with 63 additions and 25 deletions
|
@ -43,7 +43,15 @@ func initContainerService(c *cfg) {
|
|||
|
||||
cnrSrc := wrapper.AsContainerSource(wrap)
|
||||
|
||||
c.cfgObject.cnrStorage = newCachedContainerStorage(cnrSrc) // use RPC node as source of containers (with caching)
|
||||
var containerSource containerCore.Source
|
||||
|
||||
if c.cfgMorph.disableCache {
|
||||
containerSource = cnrSrc
|
||||
} else {
|
||||
containerSource = newCachedContainerStorage(cnrSrc) // use RPC node as source of containers (with caching)
|
||||
}
|
||||
|
||||
c.cfgObject.cnrSource = containerSource
|
||||
c.cfgObject.cnrClient = wrap
|
||||
|
||||
localMetrics := &localStorageLoad{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue