2009-03

Download Document
Showing pages : 1 - 3 of 285
This preview has blurred sections. Sign up to view the full version! View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Memory not released in SoftRefFilesCache Implementation of method putFile(final FileObject file) does not remove references from refReverseMap when adding a new file. #current implementation {noformat} synchronized (files) { files.put(file.getName(), ref); synchronized(refReverseMap) { refReverseMap.put(ref, key); } } {noformat} #should become: {noformat} synchronized (files) { Reference old = files.put(file.getName(), ref); synchronized(refReverseMap) { refReverseMap.remove(old); refReverseMap.put(ref, key); } } {noformat} HTTP only allows reading from one file at a time VFS 164 modified HttpClientFactory to use a single connection per thread. The consequence of this is that only a single file can be accessed at a time. Several applications, such as Commons Configuration and XML includes will read a second file while processing the first. In the case of Commons Configuration an IOException is being thrown when the first file is closed because it was already closed by ThreadLocalHttpConnectionManager. Memory leaks in DIH If delta-import is executed many times, the heap utilization grows up and finally OutOfMemoryError occurs. When delta-import is executed with SqlEntityProcessor, the instances of TemplateString cached in VariableResolverImpl#TEMPLATE_STRING#cache. If the deltaQuery contains variable like `last_index_time', the cached values never used increases. Similarly, I guess that the cache increases when fetching each modified row with primary key. I think these queries should not be cached. I came up with two solutions: 1) Not to cache queries to get modified rows. 2) Make VariableResolverImpl#TEMPLATE_STRING non-static. Or clear cache on finishing delta-import. I think that #1 is better for performance than #2, but #2 is easier to solve the problem. I made a patch in #2 way, and then tested two solr applications with `-XX: +PrintClassHistgram' option....
View Full Document