Hi everyone,

For some years now, we are encountering recurring data corruption in one of 
our product using H2. We hoped that the problem will eventually go away 
after a clean-up of the database management code and an upgrade of our 
libraries (migrating from HSQLDB to H2 , then from H2 1.1.x to version 
1.3.176, currently in use), but so far it didn't helped.

Only a low percentage of users are affected (less than 0.2%), but they are 
generating enough technical support to be a real problem for us, since we 
need to manually recover every corrupted database.

Here are some key facts:
- The database schema is really simple: a few tables with some basic 
constraints, one of them containing a collection of BLOBs (PDF files).
- The database is encrypted using the built-in AES cipher. Our connection 
string looks like this: jdbc:h2:/path/to/the/db/db_name;CIPHER=AES 
secret_key
- Database management is performed through Hibernate (current version: 
4.1.7).
- Analysis of the corrupted DBs showed no obvious pattern: sometimes the 
data itself is damaged (causing CRC failures which can be usually ignored 
using the built-in recovery tool), sometimes the database indexes 
themselves seem to be unusable (random exceptions at various point in 
code), with sometime a mix of both. There is no meaningful exception in log 
that may indicates that an error condition was reached in the past: we only 
see the failed opening attempts.
- Most of the corrupted DBs, but not all of them, are rather big (> 2 Mo, 
again, mostly PDF files).
- At least some of the user have stored the DB on a network drive where 
they may have been concurrent access attempts.

I cannot give an example of a corrupted DB file, since we cannot reproduce 
the issue, and the kind of data we manage is really sensitive by nature...

We are currently wondering what could be the most likely cause for such 
symptoms:
- Some problem with our database management code? (Unclosed connection 
and/or transactions ?)
- Compatibility problem between H2 and the JPA provider (Hibernate) ?
- Some encryption related problem ?
- Concurrent access attempts when stored on a network drive ?
- A bug in the H2 engine ?

Any pointer or insight would be greatly appreciated,
Thanks

Marc H.

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

Reply via email to