H2 database is corrupt suddenly after a huge number of records is inserted

168 views
Skip to first unread message

Sourav Mandal

unread,
Apr 16, 2015, 3:11:25 AM4/16/15
to h2-da...@googlegroups.com
Hi,
      We have been using H2 databases in our production, recently due to one activity somewhat like 800000 records were inserted to a table in that. And as a result the database got corrupted. As far as we know, it is a bug in H2 database that it can get corrupted any time. So, it is just heads up to the team about the recent issue regarding this which we are facing currently. Please revert back with the suggestion about anything that we need to do to get out of this situation.

This is the error we are getting,

General error: "java.lang.ArrayIndexOutOfBoundsException: 793" [50000-174] HY000/50000 (Help)
org.h2.jdbc.JdbcSQLException: General error: "java.lang.ArrayIndexOutOfBoundsException: 793" [50000-174]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
    at org.h2.message.DbException.get(DbException.java:161)
    at org.h2.message.DbException.convert(DbException.java:284)
    at org.h2.table.RegularTable.removeRow(RegularTable.java:394)
    at org.h2.store.PageStore.redo(PageStore.java:1537)
    at org.h2.store.PageStore.redoDelete(PageStore.java:1511)
    at org.h2.store.PageLog.recover(PageLog.java:334)
    at org.h2.store.PageStore.recover(PageStore.java:1371)
    at org.h2.store.PageStore.openExisting(PageStore.java:361)
    at org.h2.store.PageStore.open(PageStore.java:285)
    at org.h2.engine.Database.getPageStore(Database.java:2277)
    at org.h2.engine.Database.open(Database.java:610)
    at org.h2.engine.Database.openDatabase(Database.java:236)
    at org.h2.engine.Database.<init>(Database.java:231)
    at org.h2.engine.Engine.openSession(Engine.java:56)
    at org.h2.engine.Engine.openSession(Engine.java:160)
    at org.h2.engine.Engine.createSessionAndValidate(Engine.java:139)
    at org.h2.engine.Engine.createSession(Engine.java:122)
    at org.h2.engine.Engine.createSession(Engine.java:28)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:323)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:105)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:90)
    at org.h2.Driver.connect(Driver.java:73)
    at org.h2.server.web.WebServer.getConnection(WebServer.java:656)
    at org.h2.server.web.WebApp.login(WebApp.java:904)
    at org.h2.server.web.WebApp.process(WebApp.java:209)
    at org.h2.server.web.WebApp.processRequest(WebApp.java:168)
    at org.h2.server.web.WebThread.process(WebThread.java:138)
    at org.h2.server.web.WebThread.run(WebThread.java:94)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 793
    at org.h2.index.PageBtree.getRow(PageBtree.java:172)
    at org.h2.index.PageBtreeLeaf.remove(PageBtreeLeaf.java:228)
    at org.h2.index.PageBtreeNode.remove(PageBtreeNode.java:332)
    at org.h2.index.PageBtreeNode.remove(PageBtreeNode.java:332)
    at org.h2.index.PageBtreeIndex.remove(PageBtreeIndex.java:239)
    at org.h2.table.RegularTable.removeRow(RegularTable.java:376)

thanks,
Sourav Mandal

Thomas Mueller

unread,
Apr 16, 2015, 12:07:33 PM4/16/15
to H2 Google Group
Hi,

Do you have a reproducible test case that I could run? What is the database URL? Is this an old database or a fresh one?

Regards,
Thomas

--
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 h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

kenlo

unread,
Jun 2, 2015, 3:24:34 AM6/2/15
to h2-da...@googlegroups.com
You're not alone.  I posted a similar case in another thread.  
Reply all
Reply to author
Forward
0 new messages