Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11208

Usage SynchronousQueue in Executors prevent large scale operations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.6
    • None
    • None
    • None

    Description

      I am not sure where to start with this one.

      I tried to post this already on the mailing list: https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201708.mbox/%3c48C49426-33A2-4D79-AE26-A4515B8F834E@gmail.com%3e

      In short: the usage of a SynchronousQueue as the workQeue prevents more tasks than max threads.

      For example, taken from OverseerCollectionMessageHandler:

        ExecutorService tpe = new ExecutorUtil.MDCAwareThreadPoolExecutor(5, 10, 0L, TimeUnit.MILLISECONDS,
            new SynchronousQueue<>(),
            new DefaultSolrThreadFactory("OverseerCollectionMessageHandlerThreadFactory"));
      

      This Executor is used when doing a REPLACENODE (= ADDREPLICA) command. When the node has more than 10 collections this will fail with the mentioned java.util.concurrent.RejectedExecutionException.

      I am also not sure how to fix this. Just replacing the queue with a different implementation feels wrong to me or could cause unwanted side behaviour.

      Thanks

      Attachments

        1. response.json
          5 kB
          Rüdiger Kurz

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bjoernhaeuser Björn Häuser
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m