I got the corruption error again. This time with MVCC and no
MULTI_THREADED.
The stuff I was doing was redeploying my own custom classes and
stopping and starting h2 server.
The way I stop h2 is to send SIGTERM to the jvm process.
I was wondering if it could have something to do with that.
Eg. starting a new h2 process before the previous one has completed
doing the shutdown.
Does the previous process keep the db file locked long enough so the
next process can not mess with it?
Or could the problem lie with deploying new custom classes.
Here's the exception (the same Chunk missing issue as before)
Exception in thread "main" org.h2.jdbc.JdbcSQLException: General
error: "java.lang.IllegalStateException: Chunk 10751 not found
[1.4.181/6]" [50000-181]
at
org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.engine.Database.openDatabase(Database.java:297)
at org.h2.engine.Database.<init>(Database.java:260)
at org.h2.engine.Engine.openSession(Engine.java:60)
at org.h2.engine.Engine.openSession(Engine.java:167)
at
org.h2.engine.Engine.createSessionAndValidate(Engine.java:145)
at org.h2.engine.Engine.createSession(Engine.java:128)
at
org.h2.server.TcpServerThread.run(TcpServerThread.java:149)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Chunk 10751 not found
[1.4.181/6]
at
org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:762)
at org.h2.mvstore.MVStore.getChunk(MVStore.java:847)
at org.h2.mvstore.MVStore.readPage(MVStore.java:1795)
at org.h2.mvstore.MVMap.readPage(MVMap.java:769)
at org.h2.mvstore.MVMap.setRootPos(MVMap.java:779)
at org.h2.mvstore.MVStore.openMap(MVStore.java:449)
at
org.h2.mvstore.db.TransactionStore.openMap(TransactionStore.java:375)
at
org.h2.mvstore.db.TransactionStore$Transaction.openMap(TransactionStore.java:729)
at
org.h2.mvstore.db.MVPrimaryIndex.<init>(MVPrimaryIndex.java:74)
at org.h2.mvstore.db.MVTable.init(MVTable.java:88)
at
org.h2.mvstore.db.MVTableEngine.createTable(MVTableEngine.java:129)
at
org.h2.mvstore.db.MVTableEngine.createTable(MVTableEngine.java:41)
at org.h2.schema.Schema.createTable(Schema.java:582)
at
org.h2.command.ddl.CreateTable.update(CreateTable.java:137)
at org.h2.engine.MetaRecord.execute(MetaRecord.java:58)
at org.h2.engine.Database.open(Database.java:732)
at org.h2.engine.Database.openDatabase(Database.java:266)
... 7 more