Re: beagle doesn't remove stale locks on startup



> beagle seems not not remove its locks on the next startup after a very
> unclean shutdown, meaning that once it tries to gain a lock and fails
> because of the existing lock, it will stop indexing alltogether for that
> session. then it will not shutdown cleanly or remove the existing lock,
> meaning beagle is basically useless until you remove the lock by hand.
>
> before:
>
> Warn: Exception caught while executing
> Beagle.Daemon.ConnectionHandler:Void HandleConnection()
> Warn: System.IO.IOException: Lock obain timed
> out:
> /home/madbull/.beagle/Indexes/FileSystemIndex/Locks/lucene-40acc3cb58f13242
>ebb56fd9feecc673-write.lock -- pid  -- process exists in [0x0010e] (at
> /root/beagle/beagled/Lucene.Net/Store/Lock.cs:91)
> Lucene.Net.Store.Lock:Obtain (Int64 lockWaitTimeout)
> in [0x00039]
> (at /root/beagle/beagled/Lucene.Net/Index/IndexReader.cs:547)
> Lucene.Net.Index.IndexReader:AquireWriteLock ()
> in [0x00014]
> (at /root/beagle/beagled/Lucene.Net/Index/IndexReader.cs:576)
> Lucene.Net.Index.IndexReader:Delete (Int32 docNum)
> in [0x0001f]
> (at /root/beagle/beagled/Lucene.Net/Index/IndexReader.cs:605)
> Lucene.Net.Index.IndexReader:Delete (Lucene.Net.Index.Term term)
> in [0x000a4] (at /root/beagle/beagled/LuceneIndexingDriver.cs:126)
> Beagle.Daemon.LuceneIndexingDriver:Flush_Unlocked
> (Beagle.Daemon.IndexerRequest request)
> in [0x0000f] (at /root/beagle/beagled/LuceneIndexingDriver.cs:90)
> Beagle.Daemon.LuceneIndexingDriver:Flush (Beagle.Daemon.IndexerRequest
> request)
> in [0x00079]
> (at /root/beagle/beagled/IndexHelper/RemoteIndexerExecutor.cs:69)
> Beagle.IndexHelper.RemoteIndexerExecutor:Execute (Beagle.RequestMessage
> raw_request)
> in [0x00232] (at /root/beagle/beagled/Server.cs:275)
> Beagle.Daemon.ConnectionHandler:HandleConnection ()
> in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()
> in [0x0005a] (at /root/beagle/Util/ExceptionHandlingThread.cs:54)
> Beagle.Util.ExceptionHandlingThread:ThreadStarted ()
>
>
> # ls .beagle/Indexes/FilesystemIndex/Locks
>  lucene-0b58ff34d9f20b2c4e4d5f10dfe8bb79-write.lock
>  lucene-40acc3cb58f13242ebb56fd9feecc673-write.lock
>
> so, remove them:
> # rm .beagle/Indexes/FilesystemIndex/Locks/*lock
>
> and we come to the after:
> no problem at all. beagle runs as normal again.
> i would submit a patch, but i am by no means a C# programmer.

A few weeks back a patch was checked in CVS to fix this behaviour. Please give 
that a try (or wait for the next release, which is around the corner). Thanks 
for reporting.

> PS: this is the right place to put stuff like this, right? sorry if it's
> not.

This is indeed the right place. Welcome.

- dBera

-- 
Debajyoti Bera, Graduate Student, Theory Grp, BU-CS
@ http://cs-people.bu.edu/dbera/   http://dbera.blogspot.com
@ 617-782-1324 (R)                 617-358-2354 (O)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]