[ 
https://issues.apache.org/jira/browse/SOLR-17744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17948301#comment-17948301
 ] 

ASF subversion and git services commented on SOLR-17744:
--------------------------------------------------------

Commit aaf69dc99911edd38e9b4c9f85f8f8a8fc2d1874 in solr's branch 
refs/heads/main from Chris M. Hostetter
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=aaf69dc9991 ]

SOLR-17744: Fix AbstractCollectionsAPIDistributedZkTestBase.addReplicaTest to 
check that replicas become active

This ensures internal recovery requests are not still in process when we try to 
shutdown the cluster


> Solr shutdown does not graceful close Jetty requests/connections
> ----------------------------------------------------------------
>
>                 Key: SOLR-17744
>                 URL: https://issues.apache.org/jira/browse/SOLR-17744
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Chris M. Hostetter
>            Assignee: Chris M. Hostetter
>            Priority: Major
>             Fix For: main (10.0), 9.9
>
>         Attachments: SOLR-17744-1.patch, SOLR-17744.patch
>
>
> Solr does a lot of work internally (via things like SolrCore reference 
> counting) to ensure that we "finish" in-flight requests on orderly shutdown 
> (ie: when the user has issued a "stop" command) – but it does not appear that 
> we are doing anything to ensure that *Jetty* managed resources will also wait 
> for in process requests to finish.
> In particular, Jetty seems to abruptly close any existing & active network 
> connections to clients, even as Solr continues to process those requests and 
> try to write out the responses.
> There are Jetty features to ensure that  shutdown is genuinely "graceful" 
> (refusing new requests while letting existing ones finish) but Solr doesn't 
> appear to use/enable these features:
>  * In Jetty 10 & 11, this is apparently done using the {{StatisticsHandler}} 
> (as a wrapper around the main handler collection i think?)
>  ** 
> [https://github.com/jetty/jetty.project/issues/2076#issuecomment-353578130]
>  ** 
> [https://javadoc.jetty.org/jetty-11/org/eclipse/jetty/server/handler/StatisticsHandler.html]
>  ** 
> [https://jetty.org/docs/jetty/11/programming-guide/server/http.html#handler-use-util-stats-handler]
>  * In Jetty 12+ there is a {{graceful}} module that provides a 
> {{GracefulHandler}} (which seems like a slightly more robust version of what 
> {{StatisticsHandler}} does in jetty-10, but with less statistics tracking 
> overhead)
>  ** 
> [https://jetty.org/docs/jetty/12/operations-guide/start/index.html#stop-graceful]
>  ** 
> [https://jetty.org/docs/jetty/12/operations-guide/modules/standard.html#graceful]
>  
> The net result is that even during planned shutdown (or restart) of Solr 
> nodes, clients can get lots of errors.



--
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

Reply via email to