开发者

H2 database: What is and why appears database.xx.log.db.corrupt binary file

I am extensively using H2 database for my project (lots of inserts and selects) and I have noticed that in the database directory appear binary files which have the name: database.xx.log.db.corrupt, where xx - a number.

Does开发者_JAVA技巧 anybody know if there are possibility to understand what this file stands for and why it appears?


At most one file with this name may be created when the database is started, after a crash (power failure or killed process), if the file header of the transaction log file (database.xx.log.db) is corrupt. Usually the file can be ignored, it's just not deleted to that the crash can be investigated if necessary. It doesn't mean you have lost data. By the way the relevant source code is here: http://code.google.com/p/h2database/source/browse/branches/version-1.1.x/h2/src/main/org/h2/log/LogSystem.java#300

This means you are using H2 version 1.1.x. In the meantime (since version 1.2.x) H2 doesn't use separate transaction log files. Instead, the transaction log is integrated into the main database file. I suggest to upgrade to a more recent version of H2.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜