[ https://issues.apache.org/jira/browse/SOLR-17158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17891261#comment-17891261 ]
Gus Heck commented on SOLR-17158: --------------------------------- One of the big difficulties is the rest of the code can't handle the case where no shard response has been received. There seemed to be multiple places where that hasn't been considered. One prominent example is that because then mergeIds never gets called and {{_responseDocs}} is never initialized in ResponseBuilder... then later several bits of code try to use getResponseDocs without a null check and blow up... I think the first one that gets hit is: {{org.apache.solr.handler.component.QueryComponent#regularFinishStage }}where it tries to get an iterator... I'm going to guess this or something like it is the NPE you found when cherry pickingĀ [https://github.com/apache/solr/pull/2493] I tried adding an initialization of that field, but then I soon hit something else uninitialized and I became scared of trying to also reform something as central and widely used as ResponseBuilder at the same time. My conclusion was that it was critical in the code as it exists to ensure that either at least one shard response is received or srsp.setException is called. There is a test that intentionally shuts down all shards that hits this kind of case unless recordNoUrlShardResponse() is called. (at one point I tried to eliminate the exception creation there but then found out it existed to later be thrown and thus prevent finishStage() from being called on components when all shards fail...). > Terminate distributed processing quickly when query limit is reached > -------------------------------------------------------------------- > > Key: SOLR-17158 > URL: https://issues.apache.org/jira/browse/SOLR-17158 > Project: Solr > Issue Type: Sub-task > Components: Query Limits > Reporter: Andrzej Bialecki > Assignee: Gus Heck > Priority: Major > Labels: pull-request-available > Fix For: main (10.0), 9.8 > > Time Spent: 8h 50m > Remaining Estimate: 0h > > Solr should make sure that when query limits are reached and partial results > are not needed (and not wanted) then both the processing in shards and in the > query coordinator should be terminated as quickly as possible, and Solr > should minimize wasted resources spent on eg. returning data from the > remaining shards, merging responses in the coordinator, or returning any data > back to the user. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org