mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
implement batched index retrieval in GetIndexes method
This commit is contained in:
committed by
Dan Christian Bogos
parent
8d05c14aec
commit
8546c4c64e
@@ -131,7 +131,7 @@ func (apierSv1 *APIerSv1) GetFilterIndexes(ctx *context.Context, arg *AttrGetFil
|
||||
tntCtx = utils.ConcatenatedKey(tnt, arg.Context)
|
||||
}
|
||||
if indexes, err = apierSv1.DataManager.GetIndexes(
|
||||
arg.ItemType, tntCtx, utils.EmptyString, true, true); err != nil {
|
||||
arg.ItemType, tntCtx, true, true); err != nil {
|
||||
return
|
||||
}
|
||||
if arg.FilterType != utils.EmptyString {
|
||||
|
||||
@@ -286,7 +286,7 @@ func composeCacheArgsForFilter(dm *engine.DataManager, fltr *engine.Filter, tnt,
|
||||
|
||||
var rcvIndx map[string]utils.StringSet
|
||||
if rcvIndx, err = dm.GetIndexes(utils.CacheReverseFilterIndexes, tntID,
|
||||
utils.EmptyString, true, true); err != nil && err != utils.ErrNotFound { // error when geting the revers
|
||||
true, true); err != nil && err != utils.ErrNotFound { // error when geting the revers
|
||||
return
|
||||
}
|
||||
if err == utils.ErrNotFound || len(rcvIndx) == 0 { // no reverse index for this filter
|
||||
|
||||
Reference in New Issue
Block a user