[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-274?pag...
]
Sanne Grinovero commented on HSEARCH-274:
-----------------------------------------
with the last sentence I mean that, instead of returning Lucene's type, we could wrap
it in our own implementation (extending the original) for some good reasons:
1)contain the references needed to close it. Currently on closing we have to dive in a
synchronized hashmap to lookup the datastructures we had at opening time;
we could hold a reference to it to avoid the synchronized hashmap.
This is not just going to halve the contention on the hashmap, but could potentially
remove the need for it completely; combined with the NIOFSDirectory this
would remove most (all?) contention on read (and search) operations.
2)override the close() method. Currently we rely on the users have read all warnings in
the docs about not to close it, but becasue of 1) we could actually delegate to our own
closing routines, and/or issue a warning about the crime.
Use Lucene's new readonly IndexReader
-------------------------------------
Key: HSEARCH-274
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-274
Project: Hibernate Search
Issue Type: Improvement
Components: directory provider, documentation
Reporter: Sanne Grinovero
Assignee: Sanne Grinovero
Fix For: 3.1.0.CR1
# LUCENE-1329: Add optional readOnly boolean when opening an IndexReader. A readOnly
reader is not allowed to make changes (deletions, norms) to the index; in exchanged, the
isDeleted method, often a bottleneck when searching with many threads, is not
synchronized. The default for readOnly is still false, but in 3.0 the default will become
true.
(Jason Rutherglen via Mike McCandless)
In addition we should wrap the returned IndexReader to contain needed information to
close it without having to search it back in synchronized hashmaps.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira