mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
skip empty removeIndexKeys to avoid slow ops
This commit is contained in:
committed by
Dan Christian Bogos
parent
2590381402
commit
547c4940ec
@@ -237,6 +237,9 @@ func UpdateFilterIndexes(dm *DataManager, tnt string, oldFltr *Filter, newFltr *
|
||||
// Used to update the index map when a filter is modified.
|
||||
func removeFilterIndexesForFilter(dm *DataManager, idxItmType, cacheItmType, tnt string,
|
||||
removeIndexKeys []string, itemIDs utils.StringMap) error {
|
||||
if len(removeIndexKeys) == 0 {
|
||||
return nil // no indexes to remove
|
||||
}
|
||||
refID := guardian.Guardian.GuardIDs(utils.EmptyString,
|
||||
config.CgrConfig().GeneralCfg().LockingTimeout, idxItmType+tnt)
|
||||
defer guardian.Guardian.UnguardIDs(refID)
|
||||
|
||||
Reference in New Issue
Block a user