You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Edgar Poce (JIRA)" <ji...@apache.org> on 2005/10/03 01:22:48 UTC

[jira] Commented: (JCR-233) repository lock file not removed without a clean shutdown

    [ http://issues.apache.org/jira/browse/JCR-233?page=comments#action_12331101 ] 

Edgar Poce commented on JCR-233:
--------------------------------

> The problem comes from the fact that the simple presence of the .lock file is used to indicate a live instance.

Not only a live instance ... The idea was no only to prevent 2 jackrabbit instances running but also to let the user know that the repository wasn't shutdown propertly. Clean shutdowns are very important, actually I turned my repository inconsistent a couple of times killing the jvm process.

> I suggest replacing this behavior using this method (used for example by eclipse when opening workspaces):
> - when an instance is loaded create a ".lock" file and open it with exclusive access

I'm not sure but I think this was the policy for the index lock some months ago, and I'm happy it changed because a few times I had to reboot XP when I killed the jvm process. I couldn't remove the lock, not even from the explorer. So, I don't think it's a good idea to change the current behaviour.

> repository lock file not removed without a clean shutdown
> ---------------------------------------------------------
>
>          Key: JCR-233
>          URL: http://issues.apache.org/jira/browse/JCR-233
>      Project: Jackrabbit
>         Type: Bug
>   Components: core
>     Versions: 1.0
>     Reporter: fabrizio giustina

>
> actually when a repository is loaded a ".lock" file is created. This file is removed only after a clean shutdown but, if a jackrabbit instance has been killed, you have to manually delete the file in order to load the repository again, also if there was no live instance of jackrabbit that was using it.
> The problem comes from the fact that the simple presence of the .lock file is used to indicate a live instance.
> I suggest replacing this behavior using this method (used for example by eclipse when opening workspaces):
> - when an instance is loaded create a ".lock" file and open it with exclusive access
> - when a new instance is started try to delete an eventual .lock file. Only if the file can't be deleted because in use assume that another jackrabbit instance is running.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira