Database Corruption

87 views
Skip to first unread message

bludginozzie

unread,
Jan 28, 2009, 5:57:49 PM1/28/09
to H2 Database
Hi,

I am currently using HSQLDB in a production application and getting
the occasional report of database corruption. I have had it happen to
me and the whole database just goes wierd. I am considering a switch
to H2 but I am concerned that it will suffer the same problems. Has
anyone had problems with corruption in H2 and/or any thoughts on
this? aka.. is H2 production ready?

Thanks

Mark

Thotheolh

unread,
Jan 29, 2009, 2:26:26 AM1/29/09
to H2 Database
Hi. maybe you can state what kind of corruption you are worried that
would occur on H2 which happened on HSQLDB ?

tsukasa

unread,
Jan 29, 2009, 3:46:16 PM1/29/09
to H2 Database
hi, at the end for me it has been slighty worse than hsqldb. 1 of 5
databases have failed sometime!. Average life of them being just one
year. It has been bad, even when I am called via telephone I am with a
little fear because of precisely this. The "File mismacth error" has
appear to me even with the newest versions prior to 1.0. My Database
sizes are less than 100 mb, but with several tables.
More than have of the time is after a sudden power off of the machine,
but not always.
Only since recently i have the trace turned on, but for example the
last 2 clients who had a problem didn't want to send me the corrupted
files!. Nobody wants to do that if it is not really need it, and when
they reuse one of the automatic backups and keep working with that
they thunk send me the files is not needed. In my own computer, or
with the couple of databases that I host in my vps, there has been no
problem yet since I turned the trace on, so I can't even help. May be
my database model is "delicated"..
> > Mark- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

bludginozzie

unread,
Jan 29, 2009, 5:25:56 PM1/29/09
to H2 Database
Hi, with HSQLDB about once a month I get a user who has a corrupt
database, with the previous version this was as high as 3 a month.
The main problem by far is when the indexes in the script file do not
match the data file. In previous versions this used to throw an
IndexOutOfBoundsException but now it can recover from this in some
circumstances which is why my corruption rate is less. In the
circumstances when it cannot recover it fails silently and the
database is just crazy. Indexes are out of sync with the data and
fields get junk in them. These problems usually (not always) arise
from external causes such as power failures or lock ups but the
databases ability to recover from this is imperative.

Any thoughts on this?

-Mark
> > Mark- Hide quoted text -
>
> - Show quoted text -

bludginozzie

unread,
Jan 29, 2009, 5:30:53 PM1/29/09
to H2 Database
Hi, thanks for your honest response. I am getting a similar problem
with hsql but my failure rate is not as high as yours. As a rough
guess I get about 1 in 50 failures and I have had clients with no
problems for over 4 years. See my comment above for some of the
problems I experience. I would be very interested in whether anyone
else has had experiences with corruption on either of these databases.

-Mark
> > - Mostrar texto de la cita -- Hide quoted text -

Thomas Mueller

unread,
Jan 31, 2009, 6:12:05 AM1/31/09
to h2-da...@googlegroups.com
Hi,

> I am currently using HSQLDB in a production application and getting
> the occasional report of database corruption.

I also get occasional reports about corruption for H2. In my view
that's not acceptable, and my highest priority is to understand and
fix those problems. So far there are no reproducible test cases
unfortunately. Maybe some cases are related to Tomcat that sets final
static fields to null when re-loading the web application (I just
recently found out more details about that), some cases may still be
related to out of memory. Some other cases are related to 'power off'.
There are already many tests but it seems not enough. Also, I am
currently working on a better storage engine, I hope this will
completely solve the problem.

For those who have corrupted databases, could you provide more
information? A reproducible test case would be great.

> is H2 production ready?

I think H2 is more corruption proof than HSQLDB but not as 'secure' as
MySQL or PostgreSQL. I would say it is in the same category as Apache
Derby. H2 checksums all parts of the data, so if there is a problem it
is detected early. In most cases the data is recoverable (there is a
recovery tool).

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages