Hi,
After enabling MULTI_THREADED=TRUE in H2 version 1.4.196, our automated
test started failing intermittently. Failure was due to wrong results from
a simple query:
SelectQuery query = jooqContext
.select(field_("id"))
.from(table("volume"))
.orderBy(field_("id"))
.getQuery();
return getJdbcTemplate(daoContext).query(query.getSQL(),
(ResultSet rs, int rowNum) -> rs.getLong("id"));
Table "volume" has about 5000 rows and "id" is primary key.The results
returned by the query had one missing id and one duplicate id.
Here is an excerpt from the log:
Volume ids in wrong order: prevId=74372, id=74344, ids=69659, 69660, 69661,
69662, 69663,
...
74340, 74341, 74342, 74372, 74344, 74345, 74346, 74347, 74348, 74349, 74350,
74351, 74352, 74353, 74354, 74355, 74356, 74357, 74358, 74359, 74360, 74361,
74362, 74363, 74364, 74365, 74366, 74367, 74368, 74369, 74370, 74371, 74372,
74373,
...
ID 74372 is where 74343 should have been. 74343 is missing in the output.
74372 appears in its correct place also (it is duplicated).
Debug code repeated the same query second time right after the above query
and 74343 exists in the right place in the second resultset.
Rows are not being added/removed during the test. Some updates to the rows
do happen.
This started around the time we enabled multi-threading in h2. Problem went
away after disabling multithreading.
Our code runs this query every 30 seconds. We see the problem couple of
times during 4 hour test run.
Is this a known issue? Is the way resultset gets corrupted provide any hint
about the problem?
Thanks,
neelesh
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.