* Check self references in metric agg after last doc collection (#33593) * Revert 0aff5a30c5dbad9f476be14f34b81e2d1991bb0f (#33593) * Check self refs in metric agg only once in post collection hook (#33593) * Remove unnecessary mocking (#33593)
This commit is contained in:
parent
c0c6a28e86
commit
70871b5af7
|
@ -80,7 +80,6 @@ class ScriptedMetricAggregator extends MetricsAggregator {
|
||||||
|
|
||||||
leafMapScript.setDocument(doc);
|
leafMapScript.setDocument(doc);
|
||||||
leafMapScript.execute();
|
leafMapScript.execute();
|
||||||
CollectionUtils.ensureNoSelfReferences(aggState, "Scripted metric aggs map script");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -103,4 +102,10 @@ class ScriptedMetricAggregator extends MetricsAggregator {
|
||||||
return new InternalScriptedMetric(name, null, reduceScript, pipelineAggregators(), metaData());
|
return new InternalScriptedMetric(name, null, reduceScript, pipelineAggregators(), metaData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doPostCollection() throws IOException {
|
||||||
|
CollectionUtils.ensureNoSelfReferences(aggState, "Scripted metric aggs map script");
|
||||||
|
|
||||||
|
super.doPostCollection();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue