Looking t the code, this problem probably affect current version too.

https://github.com/h2database/h2database/blob/278e6e8172db9ff393afec415cebe5fbb719ce65/h2/src/main/org/h2/store/FileLock.java#L510

I recommend to fix this issue by replacing this line:
while (locked && fileName != null) {

by:
while (fileName != null) {

When unlocking, the variable "fileName" get set to null in all cases.

On Sunday, February 28, 2016 at 2:28:05 PM UTC-5, Patrik Dufresne wrote:
>
> Hello
>
> In a Windows VM, I'm experience a race condition in FileLock.run() using 
> version 1.3.174. Basically, when I open a database with the windows 
> computer, the database get properly open, but looking at the threads, I 
> don't see a "H2 File Lock Watchdog" thread.
>
> The problem is always reproducible. In debug mode, I see the thread being 
> called, but it goes straight to "watchdog end". Most likely, called to 
> "locked 
> = true;" was run after the call to "while (locked && filename!=null)".
>
> I don't see how I can fix it from application level. Help please
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to