[hibernate-issues] [JIRA] (HSEARCH-3900) drop-and-create strategy is not working at app. startup when "hibernate.search.autoregister_listeners" is set to false. And if true, startup index creation thread are not released, sending the app in out of memory.

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Mon Apr 27 02:48:32 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *commented* on HSEARCH-3900 ( https://hibernate.atlassian.net/browse/HSEARCH-3900?atlOrigin=eyJpIjoiN2FiZjAyNzAwMmY3NGQzMDgzYTExZGMxMWI5MTQwMDMiLCJwIjoiaiJ9 )

Re: drop-and-create strategy is not working at app. startup when "hibernate.search.autoregister_listeners" is set to false. And if true, startup index creation thread are not released, sending the app in out of memory. ( https://hibernate.atlassian.net/browse/HSEARCH-3900?atlOrigin=eyJpIjoiN2FiZjAyNzAwMmY3NGQzMDgzYTExZGMxMWI5MTQwMDMiLCJwIjoiaiJ9 )

As I explained at length in my answer to your stackoverflow question ( https://stackoverflow.com/questions/61405928/hibernate-search-creating-unnecessary-threads-to-index-data-on-server-startup-wi/61406792?noredirect=1#comment108684126_61406792 ) , setting autoregister_listeners to false disables Hibernate Search completely, and that has been the case since Hibernate Search 5.5 at the very least. So this setting is unlikely to have anything to do with your problem.

You're mentioning many refresh operations on Elasticsearch's side. Did you by any chance set hibernate.search.default.elasticsearch.refresh_after_write to true ? Because that's bound to hurt performance * *a lot* *. So much so that we explained you shouldn't enable it in the documentation:

> 
> 
> 
> You should not rely on the synchronous behaviour for your production code
> except in rare cases as Elasticsearch is optimised for asynchronous
> writes: leave at false for optimal performance.
> 
> 

( https://hibernate.atlassian.net/browse/HSEARCH-3900#add-comment?atlOrigin=eyJpIjoiN2FiZjAyNzAwMmY3NGQzMDgzYTExZGMxMWI5MTQwMDMiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3900#add-comment?atlOrigin=eyJpIjoiN2FiZjAyNzAwMmY3NGQzMDgzYTExZGMxMWI5MTQwMDMiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100125- sha1:c966059 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200427/33e60dbd/attachment.html 


More information about the hibernate-issues mailing list