Solr
  1. Solr
  2. SOLR-6932

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
        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
        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
        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
        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
        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
        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
        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
        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
        Alan Woodward added a comment -

        +1

        Show
        Alan Woodward added a comment - +1
        Hide
        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
        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
        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
        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
        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
        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
        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
        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
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

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

          People

          • Assignee:
            Mark Miller
            Reporter:
            Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development