[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-329) Workers ThreadPools breaks ThreadLocals

Sanne Grinovero (JIRA) noreply at atlassian.com
Tue Apr 14 13:27:17 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32874#action_32874 ] 

Sanne Grinovero commented on HSEARCH-329:
-----------------------------------------

I think you should make your own backend, asking to stop Search from using additional threads is a huge limitation on scalability, and for sure it's not a bug.

You could copy the code from Search 3.0.1 default's backend and port only the patches you need; or it might just work as is.
Really I think the design should be to have one persistence context per database; If you are giving each client it's own database then 50mb is not much.
Another option is to use filters.. much better idea IMHO, and you'll have to mantain and manage only one index for your application.
If it gets too big or if you have "law" regulations, you can then use sharding to split the index and store them separately.

"Hibernate Search in Action" has quite some tips about this situations.

> Workers ThreadPools breaks ThreadLocals
> ---------------------------------------
>
>                 Key: HSEARCH-329
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-329
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: directory provider
>    Affects Versions: 3.1.0.GA
>            Reporter: Grégoire Rolland
>
> When Implementing multi-domains (multi-databases) FSDirectory based on thread local (to get the thread environment, database name, etc...), the threadpool used by workers "forgot" the thread local variables on the second call (for searching, indexing). Works great with 3.0.1 release, but not with 3.1.0.GA.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the hibernate-issues mailing list