Hi,

I think you are right, there is a possibility that the file is re-created
during the unlock() method. I will fix this.

> The writer opens an H2 connection, writes the data, and closes the
connection.

If you do that a lot, it will be slow.

Anyway, even if the file is not deleted, it should not be a huge problem.
The only problem is that opening the connection the next time will be
slower. But it should still work.

Regards,
Thomas



On Fri, Jan 18, 2013 at 5:26 PM, Miles Reucroft <[email protected]>wrote:

> We have an app with a single H2 writer. The writer is an rmi server and
> receives requests from multiple clients. The writer opens an H2 connection,
> writes the data, and closes the connection. This seems to work fine for the
> most part. Occasionally, we see under heavy loads that the .h2.lock file
> doesn't get removed. Very rarely happens but we can't see a scenario where
> we're not closing the connection.
>
> My question is the following: looking at FileLock.java in the 1.3.66.1
> vintage of H2, I see in the unlock() method that the lock file is removed
> before the watchdog thread is stopped. Doesn't that leave a small window
> open for the watchdog thread to recreate the lock file resulting in the
> dangling file? Shouldn't the watchdog thread be stopped first and then the
> file removed?
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/dynGVIB3fTQJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to