Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Jul 6, 2023
1 parent 38d49cf commit 5aa4992
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,18 @@ public ProfileCollectorManager(
) {
this.collectorManager = collectorManager;
this.reason = reason;
assert aggsSubCollectorManager != null && topDocsSubCollectorManager == null : "top docs manager is null while aggs manager isn't";
assert assertSubCollectorManagers() : "top docs manager is null while aggs manager isn't";
this.topDocsSubCollectorManager = topDocsSubCollectorManager;
this.aggsSubCollectorManager = aggsSubCollectorManager;
}

private boolean assertSubCollectorManagers() {
if (aggsSubCollectorManager != null) {
return topDocsSubCollectorManager != null;
}
return true;
}

@Override
public InternalProfileCollector newCollector() throws IOException {
Collector collector = collectorManager.newCollector();
Expand Down

0 comments on commit 5aa4992

Please sign in to comment.