mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Allow cache to be created for operational data on internal dataDB
This commit is contained in:
committed by
Dan Christian Bogos
parent
ec145d778e
commit
9b08994b5e
@@ -479,8 +479,8 @@ func (cfg *CGRConfig) loadDataDBCfg(jsnCfg *CgrJsonCfg) (err error) {
|
||||
// in case of internalDB we need to disable the cache
|
||||
// so we enforce it here
|
||||
if cfg.dataDbCfg.Type == utils.MetaInternal {
|
||||
// overwrite only DataDBPartitions and leave other unmodified ( e.g. *diameter_messages, *closed_sessions, etc... )
|
||||
for key := range utils.DataDBPartitions {
|
||||
// overwrite only StatelessDataDBPartitions and leave other unmodified ( e.g. *diameter_messages, *closed_sessions, etc... )
|
||||
for key := range utils.StatelessDataDBPartitions {
|
||||
if _, has := cfg.cacheCfg.Partitions[key]; has {
|
||||
cfg.cacheCfg.Partitions[key] = &CacheParamCfg{}
|
||||
}
|
||||
|
||||
@@ -1111,8 +1111,8 @@ func (cfg *CGRConfig) checkConfigSanity() error {
|
||||
// DataDB sanity checks
|
||||
if cfg.dataDbCfg.Type == utils.MetaInternal {
|
||||
for key, config := range cfg.cacheCfg.Partitions {
|
||||
if utils.DataDBPartitions.Has(key) && config.Limit != 0 {
|
||||
return fmt.Errorf("<%s> %s needs to be 0 when DataBD is *internal, received : %d", utils.CacheS, key, config.Limit)
|
||||
if utils.StatelessDataDBPartitions.Has(key) && config.Limit != 0 {
|
||||
return fmt.Errorf("<%s> %s needs to be 0 when DataBD is *internal and with no persistence, received : %d", utils.CacheS, key, config.Limit)
|
||||
}
|
||||
}
|
||||
if (cfg.dataDbCfg.Opts.InternalDBDumpInterval != 0 ||
|
||||
|
||||
Reference in New Issue
Block a user