jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: recovering from unclean shutdown
Date Tue, 28 Feb 2006 08:52:26 GMT
Manuel Simoni wrote:
> Does the JCR repository ever go into a unknown state, IOW, if I
> encounter a .lock file during startup, can I just delete and ignore it,
> or do I have to recover from a backup, if I want to be on the safe side?

The .lock is only used to prevent multiple jackrabbit instances run on 
the same underlying data. It does not indicate that the repository is in 
an unknown state. You should not have to delete the file manually. 
Jackrabbit will check if the .lock file is actively locked by another 
process and if not remove the .lock file and proceed with regular startup.

If you use a transactional persistence manager (PM) such as 
DerbyPersistenceManager the repository should never go into an unknown 
state. If it does then it's a bug.
A transactional PM guarantees that a JCR transaction is always applied 
as a whole or not at all.

There is a slight chance that the lucene index that jackrabbit uses to 
execute queries goes out of sync. Changes on the index and the PM are 
currently handled sequencially and not in a two-phase commit.
See also: http://issues.apache.org/jira/browse/JCR-204


View raw message