From 1d59325c01770c84b25419d315dc4d5d8f66a6a6 Mon Sep 17 00:00:00 2001 From: Tej Singh Date: Tue, 11 Aug 2020 23:20:43 -0700 Subject: [PATCH] Metrics no longer set whether condition is sliced Previously, all conditions with a metric condition link (as well as the primary condition for the metric) would have mSliced = true. The reason for this was historical, since conditions did not initially have dimensions, and the dimensions were inferred from the condition links. However, now conditions have dimensions explicitly stated and the rules (which have been the existing implementation are): 1. A simple condition is sliced if it has dimensions. 2. A combination condition is sliced if any of its children have dimensions. The reason for doing this is to remove all dependencies that metrics can have on conditions to simplify implementing partial config updates. Test: atest statsd_test Bug: 162322841 Change-Id: Ic5bc77530682272fab0cb3b18484338a257043cd --- cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp b/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp index 52ef95d19cdc8..9d3943fe82609 100644 --- a/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp +++ b/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp @@ -148,8 +148,6 @@ bool handleMetricWithConditions( ALOGW("cannot find Predicate \"%lld\" in the config", (long long)link.condition()); return false; } - allConditionTrackers[condition_it->second]->setSliced(true); - allConditionTrackers[it->second]->setSliced(true); } conditionIndex = condition_it->second;