File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
main/java/org/elasticsearch/action/admin/cluster/stats
test/java/org/elasticsearch/action/admin/cluster/stats Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,11 @@ private void doUpdate(CCSUsage ccsUsage) {
159159 skippedRemotes .increment ();
160160 ccsUsage .getSkippedRemotes ().forEach (remote -> byRemoteCluster .computeIfAbsent (remote , PerClusterCCSTelemetry ::new ).skipped ());
161161 }
162- ccsUsage .getFeatures ().forEach (f -> featureCounts .computeIfAbsent (f , k -> new LongAdder ()).increment ());
162+ ccsUsage .getFeatures ().forEach (f -> {
163+ if (useMRT || f .equals (MRT_FEATURE ) == false ) {
164+ featureCounts .computeIfAbsent (f , k -> new LongAdder ()).increment ();
165+ }
166+ });
163167 String client = ccsUsage .getClient ();
164168 if (client != null && KNOWN_CLIENTS .contains (client )) {
165169 // We count only known clients for now
Original file line number Diff line number Diff line change @@ -358,5 +358,6 @@ public void testUseMRTFalse() {
358358 assertThat (snapshot .getTook ().count (), equalTo (2L ));
359359 assertThat (snapshot .getTookMrtFalse ().count (), equalTo (0L ));
360360 assertThat (snapshot .getTookMrtTrue ().count (), equalTo (0L ));
361+ assertThat (snapshot .getFeatureCounts ().size (), equalTo (0 ));
361362 }
362363}
You can’t perform that action at this time.
0 commit comments