H2 in-memory database with MVCC enabled - what are the risks?

287 views
Skip to first unread message

aditya

unread,
May 23, 2013, 7:45:57 AM5/23/13
to h2-da...@googlegroups.com
Hi,

I wanted to know if it is recommended to use the MVCC parameter with an in-memory h2 database and 
are there any risks involved if it is used in production environment?
We have some scenarios wherein concurrent access to DB is required and if MVCC is not used,
it results in error 'timeout trying to lock table' (even on SELECT queries and in cases where we have nested transactions).
We are using H2 version 1.2.147 but if required we can switch to the latest version.
However, even the latest H2 documentation says that MVCC feature is still experimental.
And are there any other alternatives to MVCC, to achieve better concurrency in such situations? A quick response would be highly appreciated.

Thanks,
Aditya

Rami Ojares

unread,
May 23, 2013, 7:51:13 AM5/23/13
to h2-da...@googlegroups.com
I think everyone reading this list would like to hear a well-grounded
answer to this question.
But I quess no one is capable of answering questions of this magnitude.

- Rami
> --
> 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 h2-database...@googlegroups.com.
> To post to this group, send email to h2-da...@googlegroups.com.
> Visit this group at http://groups.google.com/group/h2-database?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

aditya

unread,
May 23, 2013, 8:15:10 AM5/23/13
to h2-da...@googlegroups.com
One minor correction in my original post - we use H2 DB in embedded mode, and not in-memory.

However, this should not change the overall magnitude of the query.

Ryan How

unread,
May 23, 2013, 9:02:31 PM5/23/13
to h2-da...@googlegroups.com
I've been using MVCC for quite a while. It appears pretty stable, but
there is a bug with FOR UPDATE and LOBS. (It doesn't work), so there are
still bugs. Furthermore MVCC is not really supported by anyone, so if
you come across bugs you'll probably need to fix them yourself.

I think once the new MVStore is operational then MVCC will be much
better supported??

Ryan
Reply all
Reply to author
Forward
0 new messages