lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject RE: Un-used index files are not getting released
Date Thu, 11 May 2017 17:33:55 GMT

: We do not open any IndexReader explicitly. We keep one instance on 
: IndexWriter open (and never close) and for searching we use 
: SearcherManager. I checked the lsof and did not find any files with 
: delete status.

what exactly does your SearchManager usage look like?  is every searcher = 
acquire() associated with a corrisponding release(searcher) ?

: Following is the output of lsof for lucene1:
: 0;lucene@lidxnj39:~[lucene@lidxnj39 ~]$ /usr/sbin/lsof | grep lucene1
: But when I get the number of files in that index folder using java 
: (File.listFiles()) it lists 1761 files in that folder. This count goes 
: down to a double digit number when I restart the tomcat.

If the JVM/Lucene had the file open, then lsof should list it -- the fact 
that your lsof list (esentially) matches your "ls -l" (accounting for a 
few files that IndexWriter may have deleted but an active searcher may be 
using) seems to suggest everything is working fine .... since only 
Files.listFiles() disagrees that hsa me fairly suspicious of the java 
code you have using Files.listFiles().

what is the fully list of file names Files.listFiles() returns?

as someone else asked: what does "ls -al" on that dir return at the same 
time as your Files.listFiles() call?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message