Well, the update wasn't that hard after all :-)
Sorry for the cheap tactics ;-P
A simple svn update was all that was needed.
So I ran the test using the head of the trunk (or 147 as it is called at
the moment).
The results were better but not optimal.
Instead of all threads throwing exceptions I got 4 exceptions with the
100 reads.
They were now of the form:
Exception in thread "Thread-4" org.h2.message.DbException: IO Exception:
"java.io.EOFException";
"/opt/dev/+apps/exodus/test/.lobs.db/216.temp.db" [90031-143]
at org.h2.message.DbException.get(DbException.java:156)
at org.h2.message.DbException.convertIOException(DbException.java:313)
at org.h2.store.FileStore.readFully(FileStore.java:287)
at
org.h2.store.FileStoreInputStream.fillBuffer(FileStoreInputStream.java:93)
at
org.h2.store.FileStoreInputStream.readBlock(FileStoreInputStream.java:73)
at org.h2.store.FileStoreInputStream.read(FileStoreInputStream.java:61)
So clearly the local copies of the blobs keep encountering EOFException
when there is a higher read concurrency.
- Rami
Rami wrote:
Hi Thomas,
I created a test case where I create 10 threads that are started
approximately the same time and read 10 separate Blobs from a table
(altogether 100 blobs).
The test case is written in Beanshell and uses some of my utility
classes so you are not capable of running it but you can check it out
as pseudocode if you want (attached).
All threads report the same error:
Exception in thread "Thread-1" java.lang.OutOfMemoryError: Requested
memory: 1952885510
at org.h2.util.Utils.newBytes(Utils.java:364)
at org.h2.store.Data.expand(Data.java:1119)
at org.h2.store.Data.checkCapacity(Data.java:1114)
at
org.h2.store.FileStoreInputStream.fillBuffer(FileStoreInputStream.java:100)
at
org.h2.store.FileStoreInputStream.readBlock(FileStoreInputStream.java:73)
at
org.h2.store.FileStoreInputStream.read(FileStoreInputStream.java:61)
I am quite convinced that these exceptions happen only when the reads
are concurrent.
When I limit the speed by writing to a slow output then I do not
encounter errors.
I will now try with version 1.2.145 as you suggested but it is a bit
more complicated in my case
because I have to merge separately my own changes to source (which you
did not accept as part of H2...)
- Rami
Thomas Mueller wrote:
Hi,
I think the problem is that you try to read from the LOB object after
going to the next row in the result set, or after closing the result
set or connection. If this is not the problem, could you try with H2
version 1.2.145? Could you create a reproducible test case?
Regards,
Thomas
--
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.