@@ -1203,9 +1203,11 @@ This database supports a pluggable file system API. The file system implementati
is selected using a file name prefix. The following file systems are included:
</p>
<ul><li><code>zip:</code> read-only zip-file based file system. Format: <code>zip:/zipFileName!/fileName</code>.
</li><li><code>split:</code> file system that splits files in 1 GB files (stackable with other file systems).
</li><li><code>nio:</code> file system that uses <code>FileChannel</code> instead of <code>RandomAccessFile</code> (faster in some operating systems).
</li><li><code>nioMapped:</code> file system that uses memory mapped files (faster in some operating systems).
</li><li><code>split:</code> file system that splits files in 1 GB files (stackable with other file systems).
Please note that there currently is a file size limitation of 2 GB when using this file system.
To work around this limitation, combine it with the split file system: <code>split:nioMapped:test</code>.
</li><li><code>memFS:</code> in-memory file system (slower than mem; experimental; mainly used for testing the database engine itself).
</li><li><code>memLZF:</code> compressing in-memory file system (slower than memFS but uses less memory; experimental; mainly used for testing the database engine itself).
@@ -48,25 +48,39 @@ Please provide any additional information below.
-----------------
Hi,
This looks like a corrupt database. A workarounds is: use the tool org.h2.tools.Recover to create the SQL script file, and then re-create the database using this script. Does it work when you do this?
This looks like a corrupt database. To recover the data, use the tool org.h2.tools.Recover to create the SQL script file, and then re-create the database using this script. Does it work when you do this?
An important corruption problem was fixed in version 1.2.135 (see the change log). Known causes for corrupt databases are:
An important corruption problem was fixed in version 1.2.135 (see the change log). Known causes for corrupt databases are: if the database was created or used with a version older than 1.2.135, and the process was killed while the database was closing or writing a checkpoint. Using the transaction isolation level READ_UNCOMMITTED (LOCK_MODE 0) while at the same time using multiple connections. Disabling database file protection using (setting FILE_LOCK to NO in the database URL). Some other areas that are not fully tested are: Platforms other than Windows XP, Linux, Mac OS X, or JVMs other than Sun 1.5 or 1.6; the feature MULTI_THREADED; the features AUTO_SERVER and AUTO_RECONNECT; the file locking method 'Serialized'.
- If the database was created or used with a version older than 1.2.135, and the process was killed while the database was closing or writing a checkpoint.
I am very interested in analyzing and solving this problem. Corruption problems have top priority for me. I have a few questions:
- Using the transaction isolation level READ_UNCOMMITTED (LOCK_MODE 0) while at the same time using multiple connections.
- Disabling database file protection using (setting FILE_LOCK to NO in the database URL).
Some other areas that are not fully tested are:
- Platforms other than Windows XP, Linux, Mac OS X, or JVMs other than Sun 1.5 or 1.6
- The feature MULTI_THREADED
- The features AUTO_SERVER and AUTO_RECONNECT
- The file locking method 'Serialized'
- Could you send the full stack trace of the exception including message text?
- What is your database URL?
- How many connections does your application use concurrently?
- Do you use temporary tables?
- With which version of H2 was this database created?
You can find it out using:
select * from information_schema.settings where name='CREATE_BUILD'
or have a look in the SQL script created by the recover tool.
- Did the application run out of memory (once, or multiple times)?
- Do you use any settings or special features (for example cache settings,
two phase commit, linked tables)?
- Do you use any H2-specific system properties?
- Is the application multi-threaded?
- What operating system, file system, and virtual machine
(java -version) do you use?
- How did you start the Java process (java -Xmx... and so on)?
- Is it (or was it at some point) a networked file system?
- How big is the database (file sizes)?
- How much heap memory does the Java process have?
- Is the database usually closed normally, or is process terminated
forcefully or the computer switched off?
- Is it possible to reproduce this problem using a fresh database
(sometimes, or always)?
- Are there any other exceptions (maybe in the .trace.db file)?
Could you send them please?
- Do you still have any .trace.db files, and if yes could you send them?
- Could you send the .h2.db file where this exception occurs?