For a complex use case with about 300000 queries we are using HSQLDB in read-only mode. After a short time, we run into an OutOfMemoryError
.
The problem is the combination of sub-select queries and read only, all other combinations work fine and fast:
simple select nested select
DB read only works OOM
DB read/write works works
Here is a simple reproducer including a (read only) data base for the reproducer.
To switch to a read/write DB, simple delete the line "readonly=true" in repo.properties and run the test again.
I suspect that the RowStoreAVLHybrid
class is part of the problem, because that class only is used in the subselect+read-only case.
Any idea what i can do besides switching the database to read/write, what i want to avoid at all cost?
There was no workaround for this bug. It has been resovled and a fix committed to the dev-three code branch for the HSQLDB version 2.5.0 release.