lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Segments file disappears, index no longer functions.
Date Fri, 23 Jan 2009 20:53:25 GMT

I think there was an issue with Lucene in the past where the rename of
segments.new to segments would hit an exception (presumably because
segments.new was held open, possibly by antivirus software or
maybe TortoiseSVN client) and then would fail.  Is it possible you're
hitting something like that?

This was one of the motivations for switching the segments writing to
'write once' (segments_N), in 2.1.

Mike

adakos wrote:

>
> Thats right, I was trying to get 2.1 but there didnt appear to be a  
> way to
> get the dll for it.  I guess my problem was that segments just wasnt  
> coming
> back, even though its meant to change segments.new to segments,  
> sometimes it
> just didn't complete that process.  The breakpoint that I was  
> referring to
> is only active when I am running the program from Visual C#, when its
> running normally it isn't present.  The only thing I can think of  
> doing at
> the moment is trying to get version 2.1(which I think was the last  
> version
> for .Net) or having the indexing program check if segments.new  
> exists and
> segments doesn't(when everything has closed) and forcefully renaming  
> it.
> The client side uses both IndexSearcher and IndexReader, the server  
> side app
> shouldn't have more than one indexing function open at any point.
>
> Anyway, thanks very much for your input!  :o)
>
>
> Michael McCandless-2 wrote:
>>
>>
>> It sounds like you're using a pre-2.1 Lucene version?
>>
>> Prior to 2.1, Lucene wrote segments.new, then removed segments, then
>> renamed segments.new to segments.  So it's actually normal that
>> segments is deleted and then quickly replaced, when closing
>> IndexWriter, and it seems like your breakpoint may accidentally be
>> triggering during this 'normal' time.  It may be best to turn off the
>> breakpoint, turn infoStream on, and get the error to happen?  Or  
>> maybe
>> change the criteria of your breakpoint: if IndexWriter is closed and
>> segments does not exist, then break?
>>
>> Do you have an IndexReader open on the same index?  If so, those
>> errors from the infoStream are normal.
>>
>> Mike
>>
>> adakos wrote:
>>
>>>
>>> Right, got some interesting information.
>>>
>>> The error occurred. The segments file was gone, I had a debug break
>>> trigger(when it pauses the program while its running) as soon as it
>>> detected
>>> the file was missing, so I checked inside the index folder and found
>>> that
>>> there was a segments.new file there instead of segments. I renamed
>>> segments.new to segments stopped the "live pause" that comes with c#
>>> and its
>>> continuing to run at the moment.
>>>
>>> I can confirm that the segments file disappeared upon closing the
>>> IndexWriter, not when it gets opened.
>>>
>>> And below is (some) of the infoStream text (its 519 pages long so
>>> didnt
>>> think it would be wise to post all of it). The messages below were
>>> the ones
>>> that looked relevant, there is either information about documents
>>> being
>>> merged or these errors as shown below. If you need the whole thing I
>>> can
>>> send it to you.
>>>
>>>
>>>
>>> System.IO.IOException: The process cannot access the file
>>> 'C:\Skyword.Server\Data\Index\_lug1.cfs' because it is being used by
>>> another
>>> process. at System.IO.__Error.WinIOError(Int32 errorCode, String
>>> maybeFullPath) at System.IO.File.Delete(String path) at
>>> Lucene.Net.Store.FSDirectory.DeleteFile(String name) at
>>> Lucene.Net.Index.IndexWriter.DeleteFiles(ArrayList files, ArrayList
>>> deletable); Will re-try later.
>>>
>>> System.IO.IOException: The process cannot access the file
>>> 'C:\Skyword.Server\Data\Index\_lulm.cfs' because it is being used by
>>> another
>>> process. at System.IO.__Error.WinIOError(Int32 errorCode, String
>>> maybeFullPath) at System.IO.File.Delete(String path) at
>>> Lucene.Net.Store.FSDirectory.DeleteFile(String name) at
>>> Lucene.Net.Index.IndexWriter.DeleteFiles(ArrayList files, ArrayList
>>> deletable); Will re-try later.
>>>
>>> System.IO.IOException: The process cannot access the file
>>> 'C:\Skyword.Server\Data\Index\_lur7.cfs' because it is being used by
>>> another
>>> process. at System.IO.__Error.WinIOError(Int32 errorCode, String
>>> maybeFullPath) at System.IO.File.Delete(String path) at
>>> Lucene.Net.Store.FSDirectory.DeleteFile(String name) at
>>> Lucene.Net.Index.IndexWriter.DeleteFiles(ArrayList files, ArrayList
>>> deletable); Will re-try later.
>>>
>>> System.IO.IOException: The process cannot access the file
>>> 'C:\Skyword.Server\Data\Index\_luws.cfs' because it is being used by
>>> another
>>> process. at System.IO.__Error.WinIOError(Int32 errorCode, String
>>> maybeFullPath) at System.IO.File.Delete(String path) at
>>> Lucene.Net.Store.FSDirectory.DeleteFile(String name) at
>>> Lucene.Net.Index.IndexWriter.DeleteFiles(ArrayList files, ArrayList
>>> deletable); Will re-try later.
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Segments-file-disappears%2C-index-no-longer-functions.-tp21579880p21587130.html
>>> Sent from the Lucene - General mailing list archive at Nabble.com.
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Segments-file-disappears%2C-index-no-longer-functions.-tp21579880p21599541.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>


Mime
View raw message