Sorry I can't reproduce the problem. This is what I have tested (using
the H2 Console):
open connection 1 to jdbc:h2:~/test;MVCC=TRUE
create table test(id int primary key, name varchar);
insert into test values(1, 'Hello World');
set autocommit false;
update test set name='Hallo Welt' where id=1;
select * from test;
-- result: 1 Hallo Welt
open connection 2 (same url)
select * from test;
-- result: 1 Hello World
Could you try that and tell me what the result is? Maybe your test
case is a bit different?
Regards,
Thomas
Thomas Mueller wrote:
> Sorry I can't reproduce the problem. This is what I have tested (using
> the H2 Console):
I have come across what I feel may be a similar problem, we are also
using MVCC and read committed concurrently.
We have a query which we expect to return a number of rows (four in this
instance), each representing a different object mapped through
hibernate. Most of the time this is successful but occasionally we are
seeing missing objects. When I tracked this down it appears that the
query is still returning four rows, the only issue is that it is
returning the *same* row four times.
This problem coincides with other threads updating these rows.
I have downloaded the source for h2 and plan on going through it this
weekend.
Just to let you know,
Kev
> query is still returning four rows, the only issue is that it is
> returning the *same* row four times.
I have a reproducible test case now. This will be fixed in the next
release. I suggest not to use the MVCC feature until then, sorry!
Regards,
Thomas
Thomas Mueller wrote:
> I have a reproducible test case now. This will be fixed in the next
> release. I suggest not to use the MVCC feature until then, sorry!
Thanks very much for this. I got so far tracking this down, going
through the LocalResult/TableFilter/MultiVersionCursor but had still to
identify the issue.
Have you decided on a date for the next release? Could this issue be
something I could help you out with?
Thanks,
Kev
> Have you decided on a date for the next release?
Releases are usually every 2-4 weeks.
> Could this issue be something I could help you out with?
Of course! You could try it out in the trunk at
http://code.google.com/p/h2database/source/checkout
> difference in the MVCC feature between an embedded and a standalone server.
I don't think the difference is the access mode. But probably it has
to do who opened the database first:
Currently the MVCC mode if set when the first connection opens the
database, and stays like this until the database is closed. If the
first connection opens the database with MVCC mode
(jdbc:h2:test;MVCC=true), then it is switched on (for this and all
following connections). If the first connection opens the database
without MVCC (jdbc:h2:test), then it is switched off for all following
connections as well. The setting stays until the database is closed
(until the last connection closes).
> I think we are both German speaking people - right?
Yes, even Swiss German ;-)
Regards,
Thomas
I have been going through this issue over the last few days but it looks
as if you may already have addressed it, is this the case? I certainly
can't reproduce the errors I was previously seeing with revision 529.
Thanks,
Kev
P.S. Do you have a JIRA repository (or similar) with current issues?
> I have been going through this issue over the last few days but it looks
> as if you may already have addressed it, is this the case?
It will be fixed in the next release.
> P.S. Do you have a JIRA repository (or similar) with current issues?
Yes: http://code.google.com/p/h2database/issues/list
There are not that many issues are most issues are fixed immediately
when found or reported. In this case they are in the change log:
http://www.h2database.com/html/changelog.html
(the duplicate row issue is also in the change log: "When using
multi-version concurrency (MVCC=TRUE), duplicate rows could appear in
the result set when running queries with uncommitted changes in the
same session.").
Regards,
Thomas
> Do you still have not fixed the time plan
> for RLL?
Sorry, no, there is no fixed time plan. I agree row level locking is
important, but at the moment I can not promise when it will be
implemented.
Regards,
Thomas