lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Isakson" <Eric.Isak...@sas.com>
Subject FW: DO NOT REPLY [Bug 20024] New: - Add an IndexReader implementation that frees resources when idle and refreshes itself when stale
Date Sun, 18 May 2003 20:54:36 GMT
Hmm...didn't realize assigning this to myself would keep it from forwarding to the list. I've
attached the code and javadoc to the bug.
 
I haven't done much testing with this yet and I think there are a few things I'd like to refactor
but I'd like feedback if anyone thinks what I've put together so far seems useful. 
 
I put the class together to help me work on a plugin to Eclipse for navigating around a Lucene
index. The Eclipse work is nowhere near prime time (it is my first plugin, I'm using it as
a learn by doing project). Is anyone else working on any Lucene/Eclipse integration? The current
1.2 plugin just makes Lucene available to other Eclipse plugins, I'm trying to go a bit further
than that and provide an index browser view.
 
Eric

	-----Original Message----- 
	From: bugzilla@apache.org [mailto:bugzilla@apache.org] 
	Sent: Sun 5/18/2003 12:51 PM 
	To: Eric Isakson 
	Cc: 
	Subject: DO NOT REPLY [Bug 20024] New: - Add an IndexReader implementation that frees resources
when idle and refreshes itself when stale
	
	

	DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
	RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
	<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20024>.
	ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
	INSERTED IN THE BUG DATABASE.
	
	http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20024
	
	Add an IndexReader implementation that frees resources when idle and refreshes itself when
stale
	
	           Summary: Add an IndexReader implementation that frees resources
	                    when idle and refreshes itself when stale
	           Product: Lucene
	           Version: CVS Nightly - Specify date in submission
	          Platform: All
	        OS/Version: All
	            Status: NEW
	          Severity: Enhancement
	          Priority: Other
	         Component: Index
	        AssignedTo: Eric.Isakson@sas.com
	        ReportedBy: Eric.Isakson@sas.com
	
	
	Here is a little something I worked on this weekend that I wanted to contribute
	back as I think others might find it very useful.
	
	I extended IndexReader and added support for configuring an idle timeout and
	refresh interval.
	
	It uses a monitoring thread to watch for the reader going idle. When the reader
	goes idle it is closed. When the index is read again it is re-opened.
	
	It uses another thread to periodically check when the reader needs to be
	refreshed due to a change to index. When the reader is stale, it closes the
	reader and reopens the index.
	
	It is acually delegating all the work to another IndexReader implementation and
	just handling the threading and synchronization. When it closes a reader, it
	delegates the close to another thread that waits a bit (configurable how long)
	before actually closing the reader it was delegating to. This gives any
	consumers of the original reader a chance to finish up their last action on the
	reader.
	
	This implementation sacrifices a little bit of speed since there is a bit more
	synchroniztion to deal with and the delegation model puts extra calls on the
	stack, but it should provide long running applications that have idle periods
	or frequently changing indices from having to open and close readers all the
	time or hold open unused resources.
	

Mime
View raw message