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

DistributedUpdateProcess processCommit/deleteByQuery call finish on DUP and SolrCmdDistributor, which violates the lifecycle and can cause bugs.



    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.1, 6.0
    • Component/s: None
    • Labels:


      trying to wrap my head around a weird bug in my experiements with SOLR-445, i realized that DUP.processDelete has a direct call to finish().

      This violates the normal lifecycle of an UpdateProcessor (finish is only suppose to be called exactly once after processing any/all UpdateCommands) and could potentially break any UpdateProcessors configured after DUP (or in my case: processors configured before DUP that expect to be in charge of calling finish, and catching any resulting exceptions, as part of the normal life cycle)

      Independent of how it impacts other update processors, this also means that:

      1. all the logic in DUP.doFinish is getting executed twice – which seems kind of expensive/dangerous to me since there is leader initiated recovery involved in this method
      2. SolrCmdDistributor.finish() gets called twice, which means StreamingSolrClients.shutdown() gets called twice, which means ConcurrentUpdateSolrClient.close() gets called twice ... it seems like we're just getting really lucky that (as configured by DUP) all of these resources are still usable after being finished/shutdown/closed


        1. SOLR-8633.patch
          3 kB
          Chris M. Hostetter

          Issue Links



              • Assignee:
                markrmiller@gmail.com Mark Miller
                hossman Chris M. Hostetter
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: