Hello,
I am experimenting with H2 (v1.4.177) a little and ran into following
errors.
My guess is that the main problem is the IndexOutOfBoundsException in MVMap
which I can again only guess to have been caused by some concurrency
problem. This happened to me only once in 4 runs of the process (few
threads inserting high volumes of data concurrently).
Secondary problem might be just incorrect error handling but it appears
that H2 db was left in inconsistent state and all subsequent DML commands
failed with "Corrupt page count" error and later with "Transaction is
closed". According to logs we even reestablished connection to H2 after
the IndexOutOfBoundsException error which would indicate the page count
problem got persisted.
Here is the first exception where MVMap#searchRoot failed
org.h2.jdbc.JdbcSQLException: General error:
"java.lang.IndexOutOfBoundsException: Index: 1, Size: 1"; SQL statement:
insert into TFT556PROCEDURESTEP (ID_OBJECT, FG_ALLOW_NEG_VALS, FG_ALLOW_TIME,
NO_EARLST_DT_ALLOW, TXT_EDIT_MASK, TP_FORMAT, DS_STEP, TXT_HELP,
TXT_INSTRUCTION, NO_LATEST_DT_ALLOW, NO_MAX_DAYS_FUTURE, NO_MAX_DAYS_PAST,
NO_MAX_VALUE, NO_MIN_VALUE, CD_PARAMETER, CD_PARENT_STEP, NO_PRECISION,
NO_SEQUENCE, DS_SHORT_TEXT, CD_STEP, TP_STEP, TXT_SUMMARY_FIELD,
FG_UE_FROM_MOBILE, FG_USE_STEP_CMNT, TXT_USER_EXIT_NAME, CD_PROCEDURE,
NO_PROCEDURE_VERSION, NO_RECORD_TIMESTAMP, ID_VERSION, ID_PREV_VERSION1,
ID_PREV_VERSION2, ID_USER, TS_USER, TS_SERVER, FG_OBJ_DELETED, ID_MSG_RCVD,
IND_SYNC, IND_COMMS_PRIORITY) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[50000-177]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.convert(DbException.java:294)
at org.h2.mvstore.db.MVTable.addRow(MVTable.java:615)
at org.h2.command.dml.Insert.insertRows(Insert.java:157)
at org.h2.command.dml.Insert.update(Insert.java:115)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:254)
at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:199)
...
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.h2.mvstore.MVMap.searchRoot(MVMap.java:1091)
at org.h2.mvstore.MVMap.removeUnusedOldVersions(MVMap.java:900)
at org.h2.mvstore.MVMap.newRoot(MVMap.java:681)
at org.h2.mvstore.MVMap.put(MVMap.java:113)
at org.h2.mvstore.db.TransactionStore.log(TransactionStore.java:267)
at
org.h2.mvstore.db.TransactionStore$Transaction.log(TransactionStore.java:691)
at
org.h2.mvstore.db.TransactionStore$TransactionMap.trySet(TransactionStore.java:1087)
at
org.h2.mvstore.db.TransactionStore$TransactionMap.set(TransactionStore.java:1010)
at
org.h2.mvstore.db.TransactionStore$TransactionMap.put(TransactionStore.java:988)
at org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:141)
at org.h2.mvstore.db.MVTable.addRow(MVTable.java:611)
... 13 more
And here is what happened to all subsequent attempts to modify data
org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException:
Corrupt page count -232 [1.4.177/3]"; SQL statement:
COMMIT [50000-177]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.convert(DbException.java:294)
at org.h2.command.Command.executeUpdate(Command.java:262)
at org.h2.jdbc.JdbcConnection.commit(JdbcConnection.java:467)
...
... 5 more
Caused by: java.lang.IllegalStateException: Corrupt page count -232 [1.4.177/3]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:757)
at org.h2.mvstore.MVStore.applyFreedSpace(MVStore.java:1201)
at org.h2.mvstore.MVStore.storeNow(MVStore.java:970)
at org.h2.mvstore.MVStore.commitAndSave(MVStore.java:893)
at org.h2.mvstore.MVStore.commit(MVStore.java:854)
at
org.h2.mvstore.db.TransactionStore.endTransaction(TransactionStore.java:452)
at org.h2.mvstore.db.TransactionStore.commit(TransactionStore.java:343)
at
org.h2.mvstore.db.TransactionStore$Transaction.commit(TransactionStore.java:764)
at org.h2.engine.Session.commit(Session.java:488)
at org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:47)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:254)
... 7 more
thanks
Tono
--
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.