You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hrishikesh Gadre (JIRA)" <ji...@apache.org> on 2018/05/03 17:44:00 UTC

[jira] [Comment Edited] (SOLR-7344) Allow Jetty thread pool limits while still avoiding distributed deadlock.

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

Hrishikesh Gadre edited comment on SOLR-7344 at 5/3/18 5:43 PM:
----------------------------------------------------------------

[~markrmiller@gmail.com]
{quote}Is this deadlock even an issue anymore?

We are Jetty 9 now and it only offers NIO connectors (so long thread per request). AFAIK that means requests waiting on IO don't hold a thread.
{quote}
In order to fully utilize NIO connector capability, the application needs to use asynchronous servlet APIs (provided as part of Servlet 3 spec). Here is a good tutorial that you can take a look: [https://www.javacodegeeks.com/2013/08/async-servlet-feature-of-servlet-3.html]

Is it possible for us to use this feature for SOLR? Sure, but it will take a major rewrite of core parts of SOLR cloud (e.g. distributed querying, replication, remote queries etc.) as these components synchronously wait for the results of RPC calls. The servlet-request scheduler proposed in this Jira ([https://github.com/hgadre/servletrequest-scheduler)] internally uses servlet 3 async API to queue up the requests overflowing the thread-pool capacity, ensuring that distributed deadlocks are avoided without requiring *any* change in the SOLR cloud functionality.

 


was (Author: hgadre):
[~markrmiller@gmail.com]
{quote}Is this deadlock even an issue anymore?

We are Jetty 9 now and it only offers NIO connectors (so long thread per request). AFAIK that means requests waiting on IO don't hold a thread.
{quote}
In order to fully utilize NIO connector capability, the application needs to use asynchronous servlet APIs (provided as part of Servlet 3 spec). Here is a good tutorial that you can take a look: [https://plumbr.io/blog/java/how-to-use-asynchronous-servlets-to-improve-performance]

Is it possible for us to use this feature for SOLR? Sure, but it will take a major rewrite of core parts of SOLR cloud (e.g. distributed querying, replication, remote queries etc.) as these components synchronously wait for the results of RPC calls. The servlet-request scheduler proposed in this Jira ([https://github.com/hgadre/servletrequest-scheduler)] internally uses servlet 3 async API to queue up the requests overflowing the thread-pool capacity, ensuring that distributed deadlocks are avoided without requiring *any* change in the SOLR cloud functionality.

 

> Allow Jetty thread pool limits while still avoiding distributed deadlock.
> -------------------------------------------------------------------------
>
>                 Key: SOLR-7344
>                 URL: https://issues.apache.org/jira/browse/SOLR-7344
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>            Reporter: Mark Miller
>            Priority: Major
>         Attachments: SOLR-7344.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org