Re: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread Andreas Reichel
Agreed, I just provided alternatives and options.

Cheers
Andreas

On Fri, 2022-06-10 at 03:54 -0700, Ulrich wrote:
> Do you mean the migration tool as UI? 
> The database has already been migrated by exporting it to SQL and
> importing it with the FROM_1X appendix. So I do not expect any
> problems at this step. Importing from SQL should create a valid
> database file.
> 
> The current status is that I have one case where the BACKUP TO
> statement created database file that corrupts when executing a
> SHUTDOWN COMPACT on it. 
> I could not reproduce it but I try to repeat creating backups with
> BACKUP TO and check if the database files are ok.
> 
> and...@manticore-projects.com schrieb am Freitag, 10. Juni 2022 um
> 12:26:08 UTC+2:
> > Use the UI I sent to you. It takes care of those challenges. 
> > 
> > 
> > 
> > Sent from my Galaxy
> > 
> > 
> >  Original message 
> > From: Ulrich  
> > Date: 10/06/2022 12:21 (GMT+01:00) 
> > To: H2 Database  
> > Subject: Re: [h2] Database corrupted after SHUTDOWN COMPACT 
> > 
> > Stop, I am silly. It overlooked that the file created by the BACKUP
> > command is a zip file. I tried to use it as database file...
> > 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/80aafea58c3eece2fe6930cfc2914846f2f054f9.camel%40manticore-projects.com.


Re: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread Ulrich
Do you mean the migration tool as UI? 
The database has already been migrated by exporting it to SQL and importing 
it with the FROM_1X appendix. So I do not expect any problems at this step. 
Importing from SQL should create a valid database file.

The current status is that I have one case where the BACKUP TO statement 
created database file that corrupts when executing a SHUTDOWN COMPACT on 
it. 
I could not reproduce it but I try to repeat creating backups with BACKUP 
TO and check if the database files are ok.

and...@manticore-projects.com schrieb am Freitag, 10. Juni 2022 um 12:26:08 
UTC+2:

> Use the UI I sent to you. It takes care of those challenges. 
>
>
>
> Sent from my Galaxy
>
>
>  Original message 
> From: Ulrich  
> Date: 10/06/2022 12:21 (GMT+01:00) 
> To: H2 Database  
> Subject: Re: [h2] Database corrupted after SHUTDOWN COMPACT 
>
> Stop, I am silly. It overlooked that the file created by the BACKUP 
> command is a zip file. I tried to use it as database file...
>
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/h2-database/6cc93937-85e4-490d-aba9-78daf40cfc85n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/h2-database/6cc93937-85e4-490d-aba9-78daf40cfc85n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/98d6611c-00d6-426e-ba24-5c5e4da116cdn%40googlegroups.com.


Re: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread andreas
Use the UI I sent to you. It takes care of those challenges. Sent from my Galaxy
 Original message From: Ulrich  
Date: 10/06/2022  12:21  (GMT+01:00) To: H2 Database 
 Subject: Re: [h2] Database corrupted after 
SHUTDOWN COMPACT Stop, I am silly. It overlooked that the file created by the 
BACKUP command is a zip file. I tried to use it as database file...



-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/6cc93937-85e4-490d-aba9-78daf40cfc85n%40googlegroups.com.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/1N18MG-1nb5zk37vO-012XBJ%40mrelayeu.kundenserver.de.


Re: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread Ulrich
Stop, I am silly. It overlooked that the file created by the BACKUP command 
is a zip file. I tried to use it as database file...

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/6cc93937-85e4-490d-aba9-78daf40cfc85n%40googlegroups.com.


Re: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread Ulrich
I think it has something to do with the BACKUP TO command. 

I have done the following tests:

1) "Offline copy"
* Shutdown my application (using 2.1.212)
* copy the mv.db to my PC
* open it with the H2 console (2.2.219)
* run "SHUTDOWN COMPACT"
=> the database file shrinked and could be opened without problems

2) "Online copy" 
* start my application (2.1.212)
* export the database with: "java  org.h2.tools.Shell -url 
"jdbc:h2:tcp://localhost/~/data/database;LOCK_TIMEOUT=8640" -user 
xxx-password xxx -sql "BACKUP TO 'database.mv.db'"
* copy the exported database.mv.db to my PC
* open it with the H2 console (2.2.219)
 => database could not be opened: File corrupted while reading record 
"database.mv.db"

I used the Recovery tool to examin the corrupted database.mv.db (before 
opening it with the H2 console).
I exits with: "Error: org.h2.mvstore.MVStoreException: Store header is 
corrupt: F:/temp/database.mv.db" [2.2.219/6]"
The txt file created by the Recover tool ends with:

ERROR illegal position 662614016

277eada0 eof

page size total: 0 bytes, page count: 1, average page size: 0 bytes
ERROR: org.h2.mvstore.MVStoreException: Store header is corrupt: 
F:/temp/database.mv.db [2.2.219/6]
org.h2.mvstore.MVStoreException: Store header is corrupt: F:/database.mv.db 
[2.2.219/6]
at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1003)
at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:869)
at org.h2.mvstore.MVStore.(MVStore.java:463)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4082)
at org.h2.mvstore.MVStoreTool.info(MVStoreTool.java:352)
at org.h2.tools.Recover.process(Recover.java:243)
at org.h2.tools.Recover.runTool(Recover.java:136)
at org.h2.tools.Recover.main(Recover.java:102)

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/4ea6fbb7-72c7-40b5-a777-4d272a0ce82en%40googlegroups.com.


Re: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread Andreas Reichel
Very strange, it must be a different problem then. Suggestions:

1) Extract the existing DB to SQL script
2) Create a new DB from that SQL script (using the 219 H2 Driver)

3) Open the new DB, close the new DB (without DEFRAG)

4) Open the new DB, SHUTDOWN DEFRAG it

You can use the Migration
Tool https://github.com/manticore-projects/H2MigrationTool
I am not a H2 developer but do use H2 on many large databases. It
should work.

Can you share the DB SQL script with me for an independent test?

Viel Glueck
Andreas

On Fri, 2022-06-10 at 01:28 -0700, Ulrich wrote:
> I tried with the latest 219. The problem that the database corrupts
> when running SHUTDOWN COMPACT still exist.
> The compact is finished very fast but a .temp file remains in the
> database folder.
> 
> Here is the content of the trace file:
> 
> 2022-06-10 10:24:30 database: close
> org.h2.message.DbException: Eingabe/Ausgabe Fehler: "Closing"
> IO Exception: "Closing" [90028-219]
>     at org.h2.message.DbException.get(DbException.java:212)
>     at org.h2.mvstore.db.Store.close(Store.java:401)
>     at
> org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1261)
>     at org.h2.engine.Database.closeImpl(Database.java:1225)
>     at org.h2.engine.Database.close(Database.java:1144)
>     at org.h2.engine.Database.removeSession(Database.java:1072)
>     at org.h2.engine.SessionLocal.close(SessionLocal.java:899)
>     at
> org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:
> 91)
>     at
> org.h2.command.CommandContainer.update(CommandContainer.java:174)
>     at org.h2.command.Command.executeUpdate(Command.java:252)
>     at
> org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:252)
>     at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:223)
>     at org.h2.server.web.WebApp.getResult(WebApp.java:1339)
>     at org.h2.server.web.WebApp.query(WebApp.java:1137)
>     at org.h2.server.web.WebApp$1.next(WebApp.java:1103)
>     at org.h2.server.web.WebApp$1.next(WebApp.java:1)
>     at org.h2.server.web.WebThread.process(WebThread.java:188)
>     at org.h2.server.web.WebThread.run(WebThread.java:101)
>     at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Eingabe/Ausgabe
> Fehler: "Closing"
> IO Exception: "Closing" [90028-219]
>     at
> org.h2.message.DbException.getJdbcSQLException(DbException.java:554)
>     at
> org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
>     ... 19 more
> Caused by: org.h2.mvstore.MVStoreException: Double mark: 1b8/1a [1d7-
> 1d9, 22a-235, 2ac-2b1, 312-326, 32d-336, 346-352, 419-428, 485-4cb,
> 4f0-4f0, 56a-572, 59b-5a2, 621-621, 64f-67b, 682-69d, 6ef-6f4, 71b-
> 726, 751-78b, 8a6-8d4, 910-913, 960-975, 99e-9b1, 9ce-a02, a2b-a6d,
> a78-aac, ad4-af7, c03-c15, c2d-c49, c5b-c76, ce7-ce8, d50-d62, d7a-
> d96, e0b-e15, e80-ec5, f27-f5a, ff1-1013, 10e2-10f5, 12c0-12c9, 1321-
> 1331, 139c-1413, 1620-16b1, 17d1-180c, 18b4-18cb, 1952-196f, 19f9-
> 1ae3, 1aeb-1b68, 1b6f-1bfb, 1c04-1c7a, 1c82-1e52, 1e5e-1f98, 1f9f-
> 2002, 2015-218f, 2197-24a1, 24a9-24e5, 24ec-2534, 253e-25cc, 25db-
> 29c5, 29f2-2d8b, 2d93-2f4a, 2f51-3400, 3413-3447, 344f-3579, 35a2-
> 3635, 364e-36cc, 36df-3865, 3871-3872, 387d-398f, 399a-3a5c, 3a64-
> 3a8c, 3a94-3ac2, 3ad7-3b7c, 3b88-3b9c, 3bc7-3e41, 3e4d-3e92, 3eaf-
> 3fd0, 3fd8-4164, 4183-41a2, 41b8-41ee, 41f6-4214, 421c-42f7, 431a-
> 4344, 436d-44a1, 44d5-44f2, 44fb-4511, 4520-4520, 452a-455d, 456b-
> 4592, 45aa-464b, 4664-4742, 4766-481d, 4829-4840, 4859-48ea, 4912-
> 498e, 4995-4a15, 4a1e-4a1e, 4a3d-4b55, 4b5c-4b72, 4b8b-4c0f, 4c24-
> 4c7b, 4c85-4d0f, 4d19-4e3f, 4e81-4ea6, 4f13-50e9, 50f2-511c, 5191-
> 5363, 5393-53c2, 53ce-550a, 558e-55f7, 5600-5695, 56a1-56b7, 56c1-
> 5791, 57c5-580f, 5820-5870, 587f-58ac, 58ce-5919, 592c-5946, 5955-
> 5955, 5961-5962, 5993-59d9, 5a0c-5a81, 5a92-5aa1, 5ad7-5bb4, 5bc3-
> 5bc3, 5bd2-5c98, 5cb4-5d2f, 5d40-5d41, 5d4f-5de3, 5dee-5ea7, 5eb4-
> 5f97, 5fd6-6123, 614e-6150, 618e-618e, 61a7-6286, 62a7-6351, 635e-
> 635e, 6390-63e6, 63f7-6419, 6481-6592, 659e-65f3, 6623-6627, 663c-
> 6659, 6664-66c5, 66d2-66d4, 6741-675a, 6763-67a5, 680d-696e, 6998-
> 69c1, 69d9-69db, 6a2c-6a4d, 6a75-6aa0, 6ada-6af1, 6b04-6b04, 6b1c-
> 6b91, 6b9a-6bcc, 6be2-6cf0, 6d07-6d27, 6d31-6d31, 6d80-6dce, 6de3-
> 6e35, 6e3e-6e95, 6eaa-6ec4, 6ef9-6f71, 6f9f-7084, 70a9-7154, 7160-
> 71cb, 71e4-71fa, 721f-7488, 74e9-74fe, 752c-7542, 75a2-75e4, 75f9-
> 7611, 7667-7680, 76a3-770a, 7721-775e, 776a-7783, 77b4-77b4, 77da-
> 77f2, 7806-7808, 783c-7852, 7876-78ca, 790c-7969, 79eb-7a35, 7a87-
> 7a8c, 7ae1-7b68, 7b8d-7b8f, 7bae-7bc7, 7be3-7c40, 7c5a-7d44, 7d59-
> 7d5d, 7e35-7e9b, 7eb5-7ecc, 7f07-7f07, 7f44-7fe7, 7ff6-7ff8, 8012-
> 802b, 8041-805a, 8108-8182, 8194-81ae, 8206-8221, 8240-831e, 8360-
> 837a, 8394-83af, 83dc-83df, 846b-8486, 84d7-84f4, 8516-8536, 8589-
> 85aa, 868d-868f, 86c3-86c3, 8b16-8b16, 8c81-8c84, 8e73-8e75, 8e9d-
> 8e9f, 904b-904b, 9067-906a, 9107-9107, 912a-912a, 9275-9276, 9287-
> 92

Re: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread Ulrich
I tried with the latest 219. The problem that the database corrupts when 
running SHUTDOWN COMPACT still exist.
The compact is finished very fast but a .temp file remains in the database 
folder.

Here is the content of the trace file:

2022-06-10 10:24:30 database: close
org.h2.message.DbException: Eingabe/Ausgabe Fehler: "Closing"
IO Exception: "Closing" [90028-219]
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.mvstore.db.Store.close(Store.java:401)
at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1261)
at org.h2.engine.Database.closeImpl(Database.java:1225)
at org.h2.engine.Database.close(Database.java:1144)
at org.h2.engine.Database.removeSession(Database.java:1072)
at org.h2.engine.SessionLocal.close(SessionLocal.java:899)
at 
org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:91)
at org.h2.command.CommandContainer.update(CommandContainer.java:174)
at org.h2.command.Command.executeUpdate(Command.java:252)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:252)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:223)
at org.h2.server.web.WebApp.getResult(WebApp.java:1339)
at org.h2.server.web.WebApp.query(WebApp.java:1137)
at org.h2.server.web.WebApp$1.next(WebApp.java:1103)
at org.h2.server.web.WebApp$1.next(WebApp.java:1)
at org.h2.server.web.WebThread.process(WebThread.java:188)
at org.h2.server.web.WebThread.run(WebThread.java:101)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Eingabe/Ausgabe 
Fehler: "Closing"
IO Exception: "Closing" [90028-219]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:554)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
... 19 more
Caused by: org.h2.mvstore.MVStoreException: Double mark: 1b8/1a [1d7-1d9, 
22a-235, 2ac-2b1, 312-326, 32d-336, 346-352, 419-428, 485-4cb, 4f0-4f0, 
56a-572, 59b-5a2, 621-621, 64f-67b, 682-69d, 6ef-6f4, 71b-726, 751-78b, 
8a6-8d4, 910-913, 960-975, 99e-9b1, 9ce-a02, a2b-a6d, a78-aac, ad4-af7, 
c03-c15, c2d-c49, c5b-c76, ce7-ce8, d50-d62, d7a-d96, e0b-e15, e80-ec5, 
f27-f5a, ff1-1013, 10e2-10f5, 12c0-12c9, 1321-1331, 139c-1413, 1620-16b1, 
17d1-180c, 18b4-18cb, 1952-196f, 19f9-1ae3, 1aeb-1b68, 1b6f-1bfb, 
1c04-1c7a, 1c82-1e52, 1e5e-1f98, 1f9f-2002, 2015-218f, 2197-24a1, 
24a9-24e5, 24ec-2534, 253e-25cc, 25db-29c5, 29f2-2d8b, 2d93-2f4a, 
2f51-3400, 3413-3447, 344f-3579, 35a2-3635, 364e-36cc, 36df-3865, 
3871-3872, 387d-398f, 399a-3a5c, 3a64-3a8c, 3a94-3ac2, 3ad7-3b7c, 
3b88-3b9c, 3bc7-3e41, 3e4d-3e92, 3eaf-3fd0, 3fd8-4164, 4183-41a2, 
41b8-41ee, 41f6-4214, 421c-42f7, 431a-4344, 436d-44a1, 44d5-44f2, 
44fb-4511, 4520-4520, 452a-455d, 456b-4592, 45aa-464b, 4664-4742, 
4766-481d, 4829-4840, 4859-48ea, 4912-498e, 4995-4a15, 4a1e-4a1e, 
4a3d-4b55, 4b5c-4b72, 4b8b-4c0f, 4c24-4c7b, 4c85-4d0f, 4d19-4e3f, 
4e81-4ea6, 4f13-50e9, 50f2-511c, 5191-5363, 5393-53c2, 53ce-550a, 
558e-55f7, 5600-5695, 56a1-56b7, 56c1-5791, 57c5-580f, 5820-5870, 
587f-58ac, 58ce-5919, 592c-5946, 5955-5955, 5961-5962, 5993-59d9, 
5a0c-5a81, 5a92-5aa1, 5ad7-5bb4, 5bc3-5bc3, 5bd2-5c98, 5cb4-5d2f, 
5d40-5d41, 5d4f-5de3, 5dee-5ea7, 5eb4-5f97, 5fd6-6123, 614e-6150, 
618e-618e, 61a7-6286, 62a7-6351, 635e-635e, 6390-63e6, 63f7-6419, 
6481-6592, 659e-65f3, 6623-6627, 663c-6659, 6664-66c5, 66d2-66d4, 
6741-675a, 6763-67a5, 680d-696e, 6998-69c1, 69d9-69db, 6a2c-6a4d, 
6a75-6aa0, 6ada-6af1, 6b04-6b04, 6b1c-6b91, 6b9a-6bcc, 6be2-6cf0, 
6d07-6d27, 6d31-6d31, 6d80-6dce, 6de3-6e35, 6e3e-6e95, 6eaa-6ec4, 
6ef9-6f71, 6f9f-7084, 70a9-7154, 7160-71cb, 71e4-71fa, 721f-7488, 
74e9-74fe, 752c-7542, 75a2-75e4, 75f9-7611, 7667-7680, 76a3-770a, 
7721-775e, 776a-7783, 77b4-77b4, 77da-77f2, 7806-7808, 783c-7852, 
7876-78ca, 790c-7969, 79eb-7a35, 7a87-7a8c, 7ae1-7b68, 7b8d-7b8f, 
7bae-7bc7, 7be3-7c40, 7c5a-7d44, 7d59-7d5d, 7e35-7e9b, 7eb5-7ecc, 
7f07-7f07, 7f44-7fe7, 7ff6-7ff8, 8012-802b, 8041-805a, 8108-8182, 
8194-81ae, 8206-8221, 8240-831e, 8360-837a, 8394-83af, 83dc-83df, 
846b-8486, 84d7-84f4, 8516-8536, 8589-85aa, 868d-868f, 86c3-86c3, 
8b16-8b16, 8c81-8c84, 8e73-8e75, 8e9d-8e9f, 904b-904b, 9067-906a, 
9107-9107, 912a-912a, 9275-9276, 9287-9289, 9309-930a, 939a-939d, 
93af-93b1, 9485-9488, 94c0-94c0, 94f8-94f8, 957a-957b, 95ea-95ef, 
96ff-96ff, 971b-971c, 975c-9762, 9805-9807, 9a11-9a11, 9a71-9a72, 
9aab-9aab, 9ad3-9ad7, 9b00-9b01, 9ba3-9ba7, 9be0-9be2, 9cff-9d01, 
9d3a-9d3f, 9d55-9d5a, 9d87-9d8c, 9df0-9df2, 9e29-9e2c, 9ec6-9ec6, 
9f23-9f23, 9fc5-9fc9, a0bc-a0bc, a0fd-a0fd, a15e-a15f, a1b7-a1ba, 
a59a-a59d, a767-a76a, a790-a791, a86b-a86c, aa9e-aaa3, aac3-aac6, 
aaf4-aaf4, ab23-ab25, ab73-ab73, aba7-abac, ac22-ac23, ac31-ac35, 
ac7c-ac7d, ad05-ad08, adfa-adff, aedc-aee1, afda-afde, b0cb-b0cc, 
b256-b25c, b2e6-b2ec, b3a7-b3ac, b3e1-b3e3, b3f1-b3f1, b4fe-b500, 
b605-b609, b63c-b63e, b754-b754, b80c-b80c, b958-b958, b96c-b971, 
b9ef-b9f2, bb1d-bb1f, bb60

Re: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread Ulrich
Great! 
Where can I find the prebuilt snapshot? Or do I have to compile it from 
source myself?
Thanks!

and...@manticore-projects.com schrieb am Freitag, 10. Juni 2022 um 09:51:37 
UTC+2:

> Greetings. 
>
> Please try the latest snapshot. It has been fixed in 219.
>
>
>
> Sent from my Galaxy
>
>
>  Original message 
> From: Ulrich  
> Date: 10/06/2022 09:34 (GMT+01:00) 
> To: H2 Database  
> Subject: [h2] Database corrupted after SHUTDOWN COMPACT 
>
> Hi all,
> I am migrating my application from H2 1.4.199 to H2 2.1.212. It's working 
> fine but the database grows and the automatic compact only has a minor 
> effect (separate mail will follow about that). So I copied the database 
> using the "BACKUP TO" command to inspect it.
> I opened the copy with the H2 console and entered a "SHUTDOWN COMPACT".
>
> Reopening the database with the H2 console shows the error " File 
> corrupted while reading record: null. Possible solution: use the recovery 
> tool [90030-212] 
>  
> 90030/90030".
>
> The trace file shows the problem:
> 2022-06-10 09:23:55 database: close
> org.h2.message.DbException: Eingabe/Ausgabe Fehler: "Closing"
> IO Exception: "Closing" [90028-212]
> at org.h2.message.DbException.get(DbException.java:212)
> at org.h2.mvstore.db.Store.close(Store.java:391)
> at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1281)
> at org.h2.engine.Database.closeImpl(Database.java:1234)
> at org.h2.engine.Database.close(Database.java:1144)
> at org.h2.engine.Database.removeSession(Database.java:1072)
> at org.h2.engine.SessionLocal.close(SessionLocal.java:899)
> at 
> org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:91)
> at org.h2.command.CommandContainer.update(CommandContainer.java:174)
> at org.h2.command.Command.executeUpdate(Command.java:252)
> at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:252)
> at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:223)
> at org.h2.server.web.WebApp.getResult(WebApp.java:1339)
> at org.h2.server.web.WebApp.query(WebApp.java:1137)
> at org.h2.server.web.WebApp$1.next(WebApp.java:1103)
> at org.h2.server.web.WebApp$1.next(WebApp.java:1090)
> at org.h2.server.web.WebThread.process(WebThread.java:189)
> at org.h2.server.web.WebThread.run(WebThread.java:102)
> at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Eingabe/Ausgabe 
> Fehler: "Closing"
> IO Exception: "Closing" [90028-212]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:554)
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
> ... 19 more
> Caused by: org.h2.mvstore.MVStoreException: Double mark: 1b8/1a [1d7-1d9, 
> 22a-235, 2ac-2b1, 312-326, 32d-336, 346-352, 419-428, 485-4cb, 4f0-4f0, 
> 56a-572, 59b-5a2, 621-621, 64f-67b, 682-69d, 6ef-6f4, 71b-726, 751-78b, 
> 8a6-8d4, 910-913, 960-975, 99e-9b1, 9ce-a02, a2b-a6d, a78-aac, ad4-af7, 
> c03-c15, c2d-c49, c5b-c76, ce7-ce8, d50-d62, d7a-d96, e0b-e15, e80-ec5, 
> f27-f5a, ff1-1013, 10e2-10f5, 12c0-12c9, 1321-1331, 139c-1413, 1620-16b1, 
> 17d1-180c, 18b4-18cb, 1952-196f, 19f9-1ae3, 1aeb-1b68, 1b6f-1bfb, 
> 1c04-1c7a, 1c82-1e52, 1e5e-1f98, 1f9f-2002, 2015-218f, 2197-24a1, 
> 24a9-24e5, 24ec-2534, 253e-25cc, 25db-29c5, 29f2-2d8b, 2d93-2f4a, 
> 2f51-3400, 3413-3447, 344f-3579, 35a2-3635, 364e-36cc, 36df-3865, 
> 3871-3872, 387d-398f, 399a-3a5c, 3a64-3a8c, 3a94-3ac2, 3ad7-3b7c, 
> 3b88-3b9c, 3bc7-3e41, 3e4d-3e92, 3eaf-3fd0, 3fd8-4164, 4183-41a2, 
> 41b8-41ee, 41f6-4214, 421c-42f7, 431a-4344, 436d-44a1, 44d5-44f2, 
> 44fb-4511, 4520-4520, 452a-455d, 456b-4592, 45aa-464b, 4664-4742, 
> 4766-481d, 4829-4840, 4859-48ea, 4912-498e, 4995-4a15, 4a1e-4a1e, 
> 4a3d-4b55, 4b5c-4b72, 4b8b-4c0f, 4c24-4c7b, 4c85-4d0f, 4d19-4e3f, 
> 4e81-4ea6, 4f13-50e9, 50f2-511c, 5191-5363, 5393-53c2, 53ce-550a, 
> 558e-55f7, 5600-5695, 56a1-56b7, 56c1-5791, 57c5-580f, 5820-5870, 
> 587f-58ac, 58ce-5919, 592c-5946, 5955-5955, 5961-5962, 5993-59d9, 
> 5a0c-5a81, 5a92-5aa1, 5ad7-5bb4, 5bc3-5bc3, 5bd2-5c98, 5cb4-5d2f, 
> 5d40-5d41, 5d4f-5de3, 5dee-5ea7, 5eb4-5f97, 5fd6-6123, 614e-6150, 
> 618e-618e, 61a7-6286, 62a7-6351, 635e-635e, 6390-63e6, 63f7-6419, 
> 6481-6592, 659e-65f3, 6623-6627, 663c-6659, 6664-66c5, 66d2-66d4, 
> 6741-675a, 6763-67a5, 680d-696e, 6998-69c1, 69d9-69db, 6a2c-6a4d, 
> 6a75-6aa0, 6ada-6af1, 6b04-6b04, 6b1c-6b91, 6b9a-6bcc, 6be2-6cf0, 
> 6d07-6d27, 6d31-6d31, 6d80-6dce, 6de3-6e35, 6e3e-6e95, 6eaa-6ec4, 
> 6ef9-6f71, 6f9f-7084, 70a9-7154, 7160-71cb, 71e4-71fa, 721f-7488, 
> 74e9-74fe, 752c-7542, 75a2-75e4, 75f9-7611, 7667-7680, 76a3-770a, 
> 7721-775e, 776a-7783, 77b4-77b4, 77da-77f2, 7806-7808, 783c-7852, 
> 7876-78ca, 790c-7969, 79eb-7a35, 7a87-7a8c, 7ae1-7b68, 7b8d-7b8f, 
> 7bae-7bc7, 7be3-7c40, 7c5a-7d44, 7d59-7d5d, 7e35-7e9b, 7eb5-7ecc, 
> 7f07-7f07, 7

RE: [h2] Database corrupted after SHUTDOWN COMPACT

2022-06-10 Thread andreas
Greetings. Please try the latest snapshot. It has been fixed in 219.Sent from 
my Galaxy
 Original message From: Ulrich  
Date: 10/06/2022  09:34  (GMT+01:00) To: H2 Database 
 Subject: [h2] Database corrupted after SHUTDOWN 
COMPACT Hi all,I am migrating my application from H2 1.4.199 to H2 2.1.212. 
It's working fine but the database grows and the automatic compact only has a 
minor effect (separate mail will follow about that). So I copied the database 
using the "BACKUP TO" command to inspect it.I opened the copy with the H2 
console and entered a "SHUTDOWN COMPACT".Reopening the database with the H2 
console shows the error "
File corrupted while reading record: null. Possible solution: use the recovery 
tool [90030-212] 90030/90030".The trace file shows the problem:2022-06-10 
09:23:55 database: closeorg.h2.message.DbException: Eingabe/Ausgabe Fehler: 
"Closing"IO Exception: "Closing" [90028-212]    at 
org.h2.message.DbException.get(DbException.java:212)    at 
org.h2.mvstore.db.Store.close(Store.java:391)    at 
org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1281)    at 
org.h2.engine.Database.closeImpl(Database.java:1234)    at 
org.h2.engine.Database.close(Database.java:1144)    at 
org.h2.engine.Database.removeSession(Database.java:1072)    at 
org.h2.engine.SessionLocal.close(SessionLocal.java:899)    at 
org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:91)    at 
org.h2.command.CommandContainer.update(CommandContainer.java:174)    at 
org.h2.command.Command.executeUpdate(Command.java:252)    at 
org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:252)    at 
org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:223)    at 
org.h2.server.web.WebApp.getResult(WebApp.java:1339)    at 
org.h2.server.web.WebApp.query(WebApp.java:1137)    at 
org.h2.server.web.WebApp$1.next(WebApp.java:1103)    at 
org.h2.server.web.WebApp$1.next(WebApp.java:1090)    at 
org.h2.server.web.WebThread.process(WebThread.java:189)    at 
org.h2.server.web.WebThread.run(WebThread.java:102)    at 
java.base/java.lang.Thread.run(Thread.java:834)Caused by: 
org.h2.jdbc.JdbcSQLNonTransientException: Eingabe/Ausgabe Fehler: "Closing"IO 
Exception: "Closing" [90028-212]    at 
org.h2.message.DbException.getJdbcSQLException(DbException.java:554)    at 
org.h2.message.DbException.getJdbcSQLException(DbException.java:477)    ... 19 
moreCaused by: org.h2.mvstore.MVStoreException: Double mark: 1b8/1a [1d7-1d9, 
22a-235, 2ac-2b1, 312-326, 32d-336, 346-352, 419-428, 485-4cb, 4f0-4f0, 
56a-572, 59b-5a2, 621-621, 64f-67b, 682-69d, 6ef-6f4, 71b-726, 751-78b, 
8a6-8d4, 910-913, 960-975, 99e-9b1, 9ce-a02, a2b-a6d, a78-aac, ad4-af7, 
c03-c15, c2d-c49, c5b-c76, ce7-ce8, d50-d62, d7a-d96, e0b-e15, e80-ec5, 
f27-f5a, ff1-1013, 10e2-10f5, 12c0-12c9, 1321-1331, 139c-1413, 1620-16b1, 
17d1-180c, 18b4-18cb, 1952-196f, 19f9-1ae3, 1aeb-1b68, 1b6f-1bfb, 1c04-1c7a, 
1c82-1e52, 1e5e-1f98, 1f9f-2002, 2015-218f, 2197-24a1, 24a9-24e5, 24ec-2534, 
253e-25cc, 25db-29c5, 29f2-2d8b, 2d93-2f4a, 2f51-3400, 3413-3447, 344f-3579, 
35a2-3635, 364e-36cc, 36df-3865, 3871-3872, 387d-398f, 399a-3a5c, 3a64-3a8c, 
3a94-3ac2, 3ad7-3b7c, 3b88-3b9c, 3bc7-3e41, 3e4d-3e92, 3eaf-3fd0, 3fd8-4164, 
4183-41a2, 41b8-41ee, 41f6-4214, 421c-42f7, 431a-4344, 436d-44a1, 44d5-44f2, 
44fb-4511, 4520-4520, 452a-455d, 456b-4592, 45aa-464b, 4664-4742, 4766-481d, 
4829-4840, 4859-48ea, 4912-498e, 4995-4a15, 4a1e-4a1e, 4a3d-4b55, 4b5c-4b72, 
4b8b-4c0f, 4c24-4c7b, 4c85-4d0f, 4d19-4e3f, 4e81-4ea6, 4f13-50e9, 50f2-511c, 
5191-5363, 5393-53c2, 53ce-550a, 558e-55f7, 5600-5695, 56a1-56b7, 56c1-5791, 
57c5-580f, 5820-5870, 587f-58ac, 58ce-5919, 592c-5946, 5955-5955, 5961-5962, 
5993-59d9, 5a0c-5a81, 5a92-5aa1, 5ad7-5bb4, 5bc3-5bc3, 5bd2-5c98, 5cb4-5d2f, 
5d40-5d41, 5d4f-5de3, 5dee-5ea7, 5eb4-5f97, 5fd6-6123, 614e-6150, 618e-618e, 
61a7-6286, 62a7-6351, 635e-635e, 6390-63e6, 63f7-6419, 6481-6592, 659e-65f3, 
6623-6627, 663c-6659, 6664-66c5, 66d2-66d4, 6741-675a, 6763-67a5, 680d-696e, 
6998-69c1, 69d9-69db, 6a2c-6a4d, 6a75-6aa0, 6ada-6af1, 6b04-6b04, 6b1c-6b91, 
6b9a-6bcc, 6be2-6cf0, 6d07-6d27, 6d31-6d31, 6d80-6dce, 6de3-6e35, 6e3e-6e95, 
6eaa-6ec4, 6ef9-6f71, 6f9f-7084, 70a9-7154, 7160-71cb, 71e4-71fa, 721f-7488, 
74e9-74fe, 752c-7542, 75a2-75e4, 75f9-7611, 7667-7680, 76a3-770a, 7721-775e, 
776a-7783, 77b4-77b4, 77da-77f2, 7806-7808, 783c-7852, 7876-78ca, 790c-7969, 
79eb-7a35, 7a87-7a8c, 7ae1-7b68, 7b8d-7b8f, 7bae-7bc7, 7be3-7c40, 7c5a-7d44, 
7d59-7d5d, 7e35-7e9b, 7eb5-7ecc, 7f07-7f07, 7f44-7fe7, 7ff6-7ff8, 8012-802b, 
8041-805a, 8108-8182, 8194-81ae, 8206-8221, 8240-831e, 8360-837a, 8394-83af, 
83dc-83df, 846b-8486, 84d7-84f4, 8516-8536, 8589-85aa, 868d-868f, 86c3-86c3, 
8b16-8b16, 8c81-8c84, 8e73-8e75, 8e9d-8e9f, 904b-904b, 9067-906a, 9107-9107, 
912a-912a, 9275-9276, 9287-9289, 9309-930a, 939a-939d, 93af-93b1, 9485-9488, 
94c0-94c0, 94f8-94f8, 957a-957b, 95ea-95ef, 96ff-96ff, 971b-971c, 975c-9762, 
9805-9807, 9a11-9a11, 9a71-9a72, 9aab-9