-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HttpSolrServer in the class of SearchServiceBean doesn't shutdown. #2706
Comments
@pengchengluo thanks for pointing this out! @bencomp and I chatted about this at http://irclog.iq.harvard.edu/dataverse/2015-10-29 (good catch, as he said) and I was wondering if you've measured how expensive the process is. Also, I would be more than happy to review a pull request if you are inclined to try addressing this issue! |
Hi @pdurbin , I have done a simple test using the following code to measure the cost. Yes, I'm very glad to contribute the dataverse. ^_^ |
I just merged #2713 (a pull request from @pengchengluo ) to address this issue. Thanks @pengchengluo ! Sending to QA. To test this, I ran my usual scripts/database/homebrew/rebuild-and-test script to make sure I got the output I expect. |
OK, search still works: basic, advanced, facets, index all. |
In the class of edu.harvard.iq.dataverse.search.SearchServiceBean, every search request create a HttpSolrServer object. However, HttpSolrServer has a method named shutdown() which releases some resources. So the code must invoke the shutdown method.
Besides, when construct the HttpSolrServer object, it will create a HttpClient. This process is expensive and there is no need to create a new HttpSolrServer for every search request.
The text was updated successfully, but these errors were encountered: