lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

MVCC:Committing the large transaction is not correct. #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Run the attached class as java application.

What is the expected output? What do you see instead?

I expected

Record counts by conn2: 1
Record counts by conn: 1

but I get the following output.

Record counts by conn2: 5000
Record counts by conn: 14999

What version of the product are you using? On what operating system, file
system, and virtual machine?

H2: 1.1.116
OS: Fedora 11
VM: Sun Java 1.6.0_14

Do you know a workaround?

Don't use MVCC.

In your view, is this a defect or a feature request?

It is a defect.

Original issue reported on code.google.com by mstky...@gmail.com on 26 Jul 2009 at 6:25

Attachments:

GoogleCodeExporter commented 9 years ago
It looks the root cause is the same as for issue 101.
When I run the test now, I get:

...
processed:29000
processed:30000
Inserting data was finished. Elapsed time of 41630 ms.
start deleting data.
Deleting data was finished. Elapsed time of 7740 ms.
Record counts by conn2: 5000
Record counts by conn: 5000

Original comment by thomas.t...@gmail.com on 2 Aug 2009 at 4:27

GoogleCodeExporter commented 9 years ago
I think this problem is not resolved.

The record count in your test result was 5000.
But I expect the record count is one.

I seem the deleting by conn2 (at line.78 in CommitTest.java) is not work.
I run the test without MVCC, I get the following.

...
processed:29000
processed:30000
Inserting data was finished. Elapsed time of 8731 ms.
start deleting data.
Deleting data was finished. Elapsed time of 13117 ms.
Record counts by conn2: 1
Record counts by conn: 1

This result is correct.
So this problem reproduces on MVCC only.

Please try to fix it again.

Original comment by mstky...@gmail.com on 3 Aug 2009 at 3:30

GoogleCodeExporter commented 9 years ago

Original comment by thomas.t...@gmail.com on 6 Aug 2009 at 5:31

GoogleCodeExporter commented 9 years ago
MVCC: the setting MAX_MEMORY_UNDO can currently not be supported when using
multi-version concurrency, that means the complete undo log must fit in memory.

A workaround is to manually set MAX_MEMORY_UNDO to Integer.MAX_VALUE.
I will change the code so that the setting is ignored when using MVCC. 

Original comment by thomas.t...@gmail.com on 6 Aug 2009 at 6:20

GoogleCodeExporter commented 9 years ago
Implemented in version 1.1.117.

Original comment by thomas.t...@gmail.com on 10 Aug 2009 at 3:39