From 9318298369a1786780a0ccc0150eae8502baeade Mon Sep 17 00:00:00 2001 From: porosnicuadrian Date: Fri, 27 Aug 2021 17:09:18 +0300 Subject: [PATCH] Removed transaction from Compute on IDs --- apier/v1/filter_indexes.go | 49 +------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/apier/v1/filter_indexes.go b/apier/v1/filter_indexes.go index 974f265b5..bc96c6ec4 100644 --- a/apier/v1/filter_indexes.go +++ b/apier/v1/filter_indexes.go @@ -434,7 +434,7 @@ func (apierSv1 *APIerSv1) ComputeFilterIndexes(args *utils.ArgsComputeFilterInde // ComputeFilterIndexIDs computes specific filter indexes func (apierSv1 *APIerSv1) ComputeFilterIndexIDs(args *utils.ArgsComputeFilterIndexIDs, reply *string) (err error) { - transactionID := utils.GenUUID() + transactionID := utils.NonTransactional tnt := args.Tenant if tnt == utils.EmptyString { tnt = apierSv1.Config.GeneralCfg().DefaultTenant @@ -577,53 +577,6 @@ func (apierSv1 *APIerSv1) ComputeFilterIndexIDs(args *utils.ArgsComputeFilterInd cacheIDs[utils.CacheDispatcherFilterIndexes] = indexes.AsSlice() } - tntCtx := args.Tenant - if args.Context != utils.EmptyString { - tntCtx = utils.ConcatenatedKey(tnt, args.Context) - } - //Now we move from tmpKey to the right key for each type - //ThresholdProfile Indexes - if len(args.ThresholdIDs) != 0 { - if err = apierSv1.DataManager.SetIndexes(utils.CacheThresholdFilterIndexes, tnt, nil, true, transactionID); err != nil { - return - } - } - //StatQueueProfile Indexes - if len(args.StatIDs) != 0 { - if err = apierSv1.DataManager.SetIndexes(utils.CacheStatFilterIndexes, tnt, nil, true, transactionID); err != nil { - return - } - } - //ResourceProfile Indexes - if len(args.ResourceIDs) != 0 { - if err = apierSv1.DataManager.SetIndexes(utils.CacheResourceFilterIndexes, tnt, nil, true, transactionID); err != nil { - return - } - } - //RouteProfile Indexes - if len(args.RouteIDs) != 0 { - if err = apierSv1.DataManager.SetIndexes(utils.CacheRouteFilterIndexes, tnt, nil, true, transactionID); err != nil { - return - } - } - //AttributeProfile Indexes - if len(args.AttributeIDs) != 0 { - if err = apierSv1.DataManager.SetIndexes(utils.CacheAttributeFilterIndexes, tntCtx, nil, true, transactionID); err != nil { - return - } - } - //ChargerProfile Indexes - if len(args.ChargerIDs) != 0 { - if err = apierSv1.DataManager.SetIndexes(utils.CacheChargerFilterIndexes, tnt, nil, true, transactionID); err != nil { - return - } - } - //DispatcherProfile Indexes - if len(args.DispatcherIDs) != 0 { - if err = apierSv1.DataManager.SetIndexes(utils.CacheDispatcherFilterIndexes, tntCtx, nil, true, transactionID); err != nil { - return - } - } //generate a load //ID for CacheFilterIndexes and store it in database loadIDs := make(map[string]int64)