New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[h2-1.4.199 MVStore] File corrupted in chunk #2139
Comments
Happens to me randomly with 1.4.199. Regressing to 1.4.197 now, will see if it makes a difference. |
I think you need to recreate your storages with a new version, old version can write invalid pages, this issue was fixed and new version has some quirks to read such pages from old version somehow, but I'm not sure that it always work. If you see such problem in the storage that was created by a new version, make sure that you don't interrupt threads during calls to MVStore's methods or use the |
Mine was created with 1.4.199. Now, it might be that I have stopped the process in the IDE - at least so far it only happened on my development machine. I am also on AUTO_SERVER=TRUE. Will observe for a while and report back if I notice anything that is helpful. |
The same happened to me on 1.4.199 on production machine. Database is non-recoverable. Sure, I have a backup. But... will revert to previous versions, which works without issues for some long time. I afraid to upgrade to .200, not sure if it is fixed there. |
After I reverted back to 1.4.197 it never happened again. Now running on 1.4.200, looks okay as well. |
It looks like it was fixed in .200. I installed version 200 and corrupted database works without restore from backup. It even don't tell that it was corrupted, just runned. |
1.4.200 tries to keep track of unexpected/unclean shutdowns and does more expensive checks/recovery on the next startup. |
Happened to me on 1.4.200 just now:
|
Happens to me when I tried to open old It throwed the exception:
But what is worse: the file became corrupted after one try to open it with Now,
But, when I tried to open the same (corrupted by I then tried to restore original So, it looks like somehow P.S. I'm not sure that "fixed" file contains all data that was before. But it looks like that is the case. But I'm not sure. Too many tables inside to carefully check them all. I think, if
How to convert old version file to new version? Is there any easy way? Export with old driver and import with new driver I think? |
You're right, When you try to open a database file created by one version of H2 with another one, you're on your own. Usually you can open older file with the newer version, but sometimes it doesn't work. Attempt to open a newer file with older H2 may definitely lead to corruption. H2 is a small database engine, you shouldn't expect all nice features of larger projects from it. |
I had the same problem with
I tried to recover it as indicated, however the I was able to solve the problem by just:
|
TYVM,very helpful!!!!! |
After upgrading my application to h2-mvstore 1.4.199 some users reported a problem loading the database files after restart:
the application works without any issue on 1.4.197..
The text was updated successfully, but these errors were encountered: