Home Forums Software ELAN File locking

File locking

This topic contains 16 replies, has 5 voices, and was last updated by  cschenk 6 days, 9 hours ago.

Viewing 7 posts - 11 through 17 (of 17 total)
Author Posts
Author Posts
November 7, 2018 at 15:34 #12489

odenbach

OK, my colleague found out that MacOS X still uses Java 1.6, so he changed his patch to work with that, now ELAN works with file locking – independant from neither platform or network file system.

November 26, 2018 at 11:53 #12518

oabramov

Hey all,

I’ve tested the patch on linux, it works fine when opening and closing files on the server. However, it messes up when working locally. When opening and closing the files, I was not able to open them again. That is, an empty file with the same name was opened instead. This happened within a session as well as after restarting ELAN. So apparently, the patch locks the local data once but does not release the file again.

November 27, 2018 at 13:21 #12521

cschenk

Hi oabramov,
I can’t reproduce your error ELAN works fine on my linux machine both on my local and on a network filesystem. My patch does not differentiate between network and local filesystems which makes me wonder why my patch is not working on your local filesystem but on your server. The way my patch locks a file is by creating a lockfile called “.$FILENAME.lock” for example “.test.eaf.lock”. If ELAN is closed normally the lockfile will be deleted and the file is unlocked again. However, if ELAN wasn’t closed normally the lockfile will not be deleted and so the file won’t be unlocked. Maybe this was the case in your tests? To solve this problem just manually delete the lockfile and you should be able to open the file again. If this is not your problem it would be interesting to know which java version you have installed on your system.

Hope this helps,

Christopher

November 27, 2018 at 13:37 #12522

oabramov

Hey Christopher,

thank you for answering. I’ve checked your suggestion and indeed, the patch creates a .lock file in my directory, however, the .lock file is still there when I close the file and ELAN. I don’t used the installer for ELAN but compiled it from source, that might be the point. That is, I’ve downloaded the source folder and compiled ELAN via maven. Perhaps the error can be reproduced if you try this too.

Best, Olga

November 28, 2018 at 13:48 #12528

cschenk

Hi Olga,
even if i compile ELAN via maven i can’t reproduce your error. Have you downloaded the latest source code from https://github.com/chschenk/ELAN/tree/feature-filelocking-5.3 ? If you are using the latest version of my patch what java version do you use?

Christopher

November 29, 2018 at 09:44 #12530

oabramov

Hi Christopher,

now, I’ve taken the latest release and the re-opening of the file works fine, so after closing I can open it again. However, the lock-file once created is not deleted and I can open the file with multiple instances of ELAN, even when should be locked. is that normal?

My java-version:

java -version
java version “1.8.0_191”
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

Best, Olga

December 3, 2018 at 14:29 #12540

cschenk

Hi Olga,
no that is not an expected behavior. Can you describe your setup and how you are testing the Patch? Are you using two different machines or just your local machine? If you use two different machines do you use the latest patch on both machines? If you are just testing on your local machine is your file located on a network share or on your local hard disk? And how do you open the two instances of ELAN?

Best, Christopher

Viewing 7 posts - 11 through 17 (of 17 total)

You must be logged in to reply to this topic.