From a19ce33183c53cecc4d4aec0efe06df8ca699df9 Mon Sep 17 00:00:00 2001 From: Ticheng Lin <51488860+ticheng-aws@users.noreply.github.com> Date: Thu, 9 Nov 2023 12:25:33 -0800 Subject: [PATCH] Update server/src/main/java/org/opensearch/search/profile/query/ConcurrentQueryProfileBreakdown.java Co-authored-by: Andriy Redko Signed-off-by: Ticheng Lin <51488860+ticheng-aws@users.noreply.github.com> Signed-off-by: Ticheng Lin --- .../profile/query/ConcurrentQueryProfileBreakdown.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/org/opensearch/search/profile/query/ConcurrentQueryProfileBreakdown.java b/server/src/main/java/org/opensearch/search/profile/query/ConcurrentQueryProfileBreakdown.java index ca8c417b61094..e1d41227a22f7 100644 --- a/server/src/main/java/org/opensearch/search/profile/query/ConcurrentQueryProfileBreakdown.java +++ b/server/src/main/java/org/opensearch/search/profile/query/ConcurrentQueryProfileBreakdown.java @@ -84,11 +84,9 @@ public Map 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() + + " of leaves breakdown in ConcurrentQueryProfileBreakdown of rewritten query for a leaf."; AbstractProfileBreakdown breakdown = contexts.values().iterator().next(); queryNodeTime = breakdown.toNodeTime() + createWeightTime; maxSliceNodeTime = 0L;