For everyone who use snapshot builds of upcoming H2 2.0

185 views
Skip to first unread message

Evgenij Ryazanov

unread,
Feb 14, 2021, 7:51:56 PM2/14/21
to H2 Database
Please note that database files created by one snapshot build should not be opened with another snapshot build to avoid data loss or corruption. Always export your data to SQL with your current build and import it into new empty database with a new build if you want to use a more recent (or older) build for a some reason.

Andreas Reichel

unread,
Feb 14, 2021, 8:12:03 PM2/14/21
to h2-da...@googlegroups.com
Thank you Evgenij,

this is where a "Build ID" or "Commit ID" would become handy, packing into "h2-2.0.201_888e228.jar" instead of "h2-2.0.201" only.
Also it wouuld be nice to be able to read that "Build ID" from the data base meta data or schema information (without opening the DB in full at the risk of corrupting it).

From an end-users point of view, the H2 releases take very long and are massive. 201 has so many beautiful improvments (which fixed a lot of real-life production issues for us) that we rather follow the development as closely as possible even when 1.4.200 is declared stable.
(At least in our experience, 1.4.200 is far less robust and correct than 2.0.201.)

I will also have to figure out, how to support "Build IDs" in the Migration Tool, because following your advise we will have to export/create 20 H2 databases weekly.

Best regards
Andreas

On Sun, 2021-02-14 at 16:51 -0800, Evgenij Ryazanov wrote:
Please note that database files created by one snapshot build should not be opened with another snapshot build to avoid data loss or corruption. Always export your data to SQL with your current build and import it into new empty database with a new build if you want to use a more recent (or older) build for a some reason.

--
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/29ca67ff-216c-4991-9da4-04271e79f964n%40googlegroups.com.

Andreas Reichel

unread,
Feb 14, 2021, 8:24:50 PM2/14/21
to h2-da...@googlegroups.com


On Mon, 2021-02-15 at 08:11 +0700, Andreas Reichel wrote:
this is where a "Build ID" or "Commit ID" would become handy, packing into "h2-2.0.201_888e228.jar" instead of "h2-2.0.201" only.

Patch attached.
Best regards

Andreas
h2_git_id.diff

Andreas Reichel

unread,
Feb 21, 2021, 10:58:20 PM2/21/21
to h2-da...@googlegroups.com
Dear All,

we have implemented support for H2 Driver Version Snapshots, based on GIT IDs.
This way, one can easily migrate many H2 databases from one H2 snapshot to another one.

You can now also add H2 Drivers to the program (e. g. for adding more snapshots or adding older H2 versions).

There are two caveats though:

1) the GIT ID is parsed from the H2 driver file name only. You will need to create correct filenames when compiling the H2 snapshots, e. g. using this patch attached to this e-mail.

2) the GIT ID itself does not say anything about a particular order. Instead, we maintain the order in a Textfile as part of the Migration Tool. 
I am looking for a better and more robust solution to this and any idea was very welcome.

@H2 Developers: Some help or feedback on this snapshot version thing was much appreciated. I understand that you can't maintain backward compatibility during the developing cycle and why export to SQL script is needed.
But at the same time, the lack of a reliable versioning makes it difficult to maintain many databases. Please consider adding the GIT ID to the H2 driver filename and also to put it into the Meta Data somewhere. So we have a chance to know which driver version to use.

Testing many H2 databases against the recent development snapshots has merrits. We found a few issues this way, which static test cases have not found before.

Thank you and best regards!


h2_git_id.diff
Reply all
Reply to author
Forward
0 new messages