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

All HttpClient ConnectionManagers and SolrJ clients should always be shutdown in tests and regular code.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None
    1. SOLR-6932.patch
      181 kB
      Mark Miller

      Issue Links

        Activity

        Hide
        markrmiller@gmail.com Mark Miller added a comment -

        Because we are not consistent with this, the current approach for SOLR-4509 ends up being a problem. Threads can be started and never stopped and the test framework will rightly flip out. We should track and ensure proper cleanup of more of our closeable objects. I'll start with ConnectionManagers and SolrJ clients as I have already had to do this work for SOLR-4509. There are others we should look at as well though.

        Show
        markrmiller@gmail.com Mark Miller added a comment - Because we are not consistent with this, the current approach for SOLR-4509 ends up being a problem. Threads can be started and never stopped and the test framework will rightly flip out. We should track and ensure proper cleanup of more of our closeable objects. I'll start with ConnectionManagers and SolrJ clients as I have already had to do this work for SOLR-4509 . There are others we should look at as well though.
        Hide
        romseygeek Alan Woodward added a comment -

        Part of the work I'm doing on SOLR-6840 has been to have a single shared HttpClient object for all the various SolrClients, which makes shutting everything down easier.

        Show
        romseygeek Alan Woodward added a comment - Part of the work I'm doing on SOLR-6840 has been to have a single shared HttpClient object for all the various SolrClients, which makes shutting everything down easier.
        Hide
        markrmiller@gmail.com Mark Miller added a comment -

        In most cases, it's pretty easy to shut things down now, just lots of places not doing it.

        Show
        markrmiller@gmail.com Mark Miller added a comment - In most cases, it's pretty easy to shut things down now, just lots of places not doing it.
        Hide
        markrmiller@gmail.com Mark Miller added a comment -

        Patch with pertinent work from SOLR-4509. This breaks quickly, so I intend to commit relatively soon if you anyone wants to help with some review.

        Show
        markrmiller@gmail.com Mark Miller added a comment - Patch with pertinent work from SOLR-4509 . This breaks quickly, so I intend to commit relatively soon if you anyone wants to help with some review.
        Hide
        romseygeek Alan Woodward added a comment -

        +1

        Show
        romseygeek Alan Woodward added a comment - +1
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1650608 from Mark Miller in branch 'dev/trunk'
        [ https://svn.apache.org/r1650608 ]

        SOLR-6932: All HttpClient ConnectionManagers and SolrJ clients should always be shutdown in tests and regular code.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1650608 from Mark Miller in branch 'dev/trunk' [ https://svn.apache.org/r1650608 ] SOLR-6932 : All HttpClient ConnectionManagers and SolrJ clients should always be shutdown in tests and regular code.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1650612 from Mark Miller in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1650612 ]

        SOLR-6932: All HttpClient ConnectionManagers and SolrJ clients should always be shutdown in tests and regular code.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1650612 from Mark Miller in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1650612 ] SOLR-6932 : All HttpClient ConnectionManagers and SolrJ clients should always be shutdown in tests and regular code.
        Hide
        tomasflobbe Tomás Fernández Löbbe added a comment -

        +1
        I'm wondering if SolrClient should be made closeable. It would sometimes warn of resource leaks

        Show
        tomasflobbe Tomás Fernández Löbbe added a comment - +1 I'm wondering if SolrClient should be made closeable. It would sometimes warn of resource leaks
        Hide
        markrmiller@gmail.com Mark Miller added a comment -

        I think all of these type of things should be made closeable - including SolrJ clients for 5.0 (rather than shutdown).

        Show
        markrmiller@gmail.com Mark Miller added a comment - I think all of these type of things should be made closeable - including SolrJ clients for 5.0 (rather than shutdown).
        Hide
        anshumg Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        anshumg Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            markrmiller@gmail.com Mark Miller
            Reporter:
            markrmiller@gmail.com Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development