Skip to content

Commit

Permalink
Update server/src/main/java/org/opensearch/search/profile/query/Concu…
Browse files Browse the repository at this point in the history
…rrentQueryProfileBreakdown.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Ticheng Lin <[email protected]>
Signed-off-by: Ticheng Lin <[email protected]>
  • Loading branch information
ticheng-aws and reta committed Nov 9, 2023
1 parent 9e90dfa commit a19ce33
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ public Map<String, Long> toBreakdownMap() {
// the new rewritten query. The sliceCollectorsToLeaves is empty because this breakdown for rewritten query gets created later
// in search leaf path which doesn't have collector. Also, this is not needed since this breakdown is per leaf and there is no
// concurrency involved.
assert contexts.size() == 1 : new OpenSearchException(
"Unexpected size: "
+ contexts.size()
+ " of leaves breakdown in ConcurrentQueryProfileBreakdown of rewritten query for a leaf."
);
assert contexts.size() == 1 : "Unexpected size: "
+ contexts.size()

Check warning on line 88 in server/src/main/java/org/opensearch/search/profile/query/ConcurrentQueryProfileBreakdown.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/search/profile/query/ConcurrentQueryProfileBreakdown.java#L88

Added line #L88 was not covered by tests
+ " of leaves breakdown in ConcurrentQueryProfileBreakdown of rewritten query for a leaf.";
AbstractProfileBreakdown<QueryTimingType> breakdown = contexts.values().iterator().next();
queryNodeTime = breakdown.toNodeTime() + createWeightTime;
maxSliceNodeTime = 0L;
Expand Down

0 comments on commit a19ce33

Please sign in to comment.