@@ -364,6 +364,7 @@ public void analyzedPlan(
364
364
QueryBuilder requestFilter ,
365
365
ActionListener <LogicalPlan > logicalPlanListener
366
366
) {
367
+ assert ThreadPool .assertCurrentThreadPool (ThreadPool .Names .SEARCH );
367
368
if (parsed .analyzed ()) {
368
369
logicalPlanListener .onResponse (parsed );
369
370
return ;
@@ -440,6 +441,11 @@ private void preAnalyzeLookupIndex(
440
441
String localPattern = lookupIndexPattern .indexPattern ();
441
442
assert RemoteClusterAware .isRemoteIndexName (localPattern ) == false
442
443
: "Lookup index name should not include remote, but got: " + localPattern ;
444
+ assert ThreadPool .assertCurrentThreadPool (
445
+ ThreadPool .Names .SEARCH ,
446
+ ThreadPool .Names .SEARCH_COORDINATION ,
447
+ ThreadPool .Names .SYSTEM_READ
448
+ );
443
449
Set <String > fieldNames = result .wildcardJoinIndices ().contains (localPattern ) ? IndexResolver .ALL_FIELDS : result .fieldNames ;
444
450
445
451
String patternWithRemotes ;
@@ -625,6 +631,11 @@ private void preAnalyzeMainIndices(
625
631
QueryBuilder requestFilter ,
626
632
ActionListener <PreAnalysisResult > listener
627
633
) {
634
+ assert ThreadPool .assertCurrentThreadPool (
635
+ ThreadPool .Names .SEARCH ,
636
+ ThreadPool .Names .SEARCH_COORDINATION ,
637
+ ThreadPool .Names .SYSTEM_READ
638
+ );
628
639
// TODO we plan to support joins in the future when possible, but for now we'll just fail early if we see one
629
640
List <IndexPattern > indices = preAnalysis .indices ;
630
641
if (indices .size () > 1 ) {
0 commit comments