SHUTDOWN DEFRAG在大型(100+ GB)数据库上失败

时间:2016-07-27 22:34:08

标签: java h2

每当我在我的数据库上调用SHUTDOWN DEFRAG时,我最终都会收到错误(我认为IllegalStateException)它无法找到特定的块!

我已经尝试了多次,并且总是得到与缺少块相同的结果。数据库很大(100+ GB)。 我从我拥有的大约4GB的数据库开始,然后在它增长到100+ GB之后,防止数据库失败。这发生了几次。 在我开始扩展数据库的程序之前,我甚至尝试了恢复工具并重新创建了4GB数据库,然后在该数据库上运行SHUTDOWN DEFRAG并且它工作正常 - 但是在数据库增长到100多GB之后又一次SHUTDOWN DEFRAG因为无法找到大块而停止工作。

任何人都会看到这样的事情,或者有人知道可能出现什么问题?

我正在使用:Windows 2012 R2 (64 bit)Java 8 (1.8.0_102-b14)H2 (1.4.191)

堆栈: `

2016-07-28 10:21:45 database: close
org.h2.message.DbException: IO Exception: "Closing" [90028-191]
    at org.h2.message.DbException.get(DbException.java:168)
    at org.h2.mvstore.db.MVTableEngine$Store.close(MVTableEngine.java:396)
    at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1386)
    at org.h2.engine.Database.close(Database.java:1286)
    at org.h2.engine.Database.removeSession(Database.java:1170)
    at org.h2.engine.Session.close(Session.java:815)
    at org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:111)
    at org.h2.command.CommandContainer.update(CommandContainer.java:98)
    at org.h2.command.Command.executeUpdate(Command.java:258)
    at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:201)
Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "Closing" [90028-191]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    ... 12 more
Caused by: java.lang.IllegalStateException: Chunk 66 not found [1.4.191/6]
    at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
    at org.h2.mvstore.MVStore.getChunk(MVStore.java:934)
    at org.h2.mvstore.MVStore.readPageChunkReferences(MVStore.java:1368)
    at org.h2.mvstore.MVStore.collectReferencedChunks(MVStore.java:1322)
    at org.h2.mvstore.MVStore.collectReferencedChunks(MVStore.java:1327)
    at org.h2.mvstore.MVStore.collectReferencedChunks(MVStore.java:1327)
    at org.h2.mvstore.MVStore.collectReferencedChunks(MVStore.java:1307)
    at org.h2.mvstore.MVStore.freeUnusedChunks(MVStore.java:1266)
    at org.h2.mvstore.MVStore.storeNowTry(MVStore.java:1054)
    at org.h2.mvstore.MVStore.storeNow(MVStore.java:1046)
    at org.h2.mvstore.MVStore.commitAndSave(MVStore.java:1035)
    at org.h2.mvstore.MVStore.beforeWrite(MVStore.java:2205)
    at org.h2.mvstore.MVMap.beforeWrite(MVMap.java:1046)
    at org.h2.mvstore.MVMap.copy(MVMap.java:1231)
    at org.h2.mvstore.MVMap.copy(MVMap.java:1248)
    at org.h2.mvstore.MVMap.copy(MVMap.java:1248)
    at org.h2.mvstore.MVMap.copy(MVMap.java:1248)
    at org.h2.mvstore.MVMap.copy(MVMap.java:1248)
    at org.h2.mvstore.MVMap.copyFrom(MVMap.java:1218)
    at org.h2.mvstore.MVStoreTool.compact(MVStoreTool.java:517)
    at org.h2.mvstore.MVStoreTool.compact(MVStoreTool.java:482)
    at org.h2.mvstore.MVStoreTool.compact(MVStoreTool.java:428)
    at org.h2.mvstore.db.MVTableEngine$Store.close(MVTableEngine.java:385)
    ... 10 more

`

0 个答案:

没有答案