Upgrade from v4.1.3 to v4.1.4 failed

Skip to first unread message

Alexander Klaus

Apr 10, 2019, 8:52:56 PM4/10/19
to RavenDB - 2nd generation document database
I followed the recommended steps to upgrade my RavenDb instance from v4.1.3 to v4.1.4 (in local Windows 10 environment).

It fails to start now and if I start in the console mode, I receive the following message:

Raven.Client.Exceptions.Server.ServerLoadFailureException: Failed to load system storage
At C:\RavenDB4\Server\RavenData\System ---> Voron.Exceptions.InvalidJournalException: Failed to open a storage at C:\RavenDB4\Server\RavenData\System due to invalid or missing journal files. In order to load the storage successfully we need all journals to be not corrupted. You can start the server in dangerous mode temporarily so it will ignore invalid journals on startup:Raven.Server.exe --Storage.Dangerous.IgnoreInvalidJournalErrors=true
This switch is meant to be use only for recovery purposes. Please make sure that you won't use it after you manage to recover your data. Eventually you should delete the system storage at 'C:\RavenDB4\Server\RavenData\System', start the server and create your databases again with the usage of existing data.
Error details: No such journal 'C:\RavenDB4\Server\RavenData\System\Journals\0000000000000000034.journal'. Journal details: CurrentJournal - 35, LastSyncedJournal - 33, LastSyncedTransactionId - 36975, Flags - IgnoreMissingLastSyncJournal
   at Raven.Server.Storage.Layout.StorageLoader.OpenEnvironmentWithPossibleLayoutUpdate(DirectoryStorageEnvironmentOptions options, StorageEnvironmentType type) in C:\Builds\RavenDB-Stable-4.1\41010\src\Raven.Server\Storage\Layout\StorageLoader.cs:line 102
   at Raven.Server.Storage.Layout.StorageLoader.OpenEnvironment(StorageEnvironmentOptions options, StorageEnvironmentType type) in C:\Builds\RavenDB-Stable-4.1\41010\src\Raven.Server\Storage\Layout\StorageLoader.cs:line 20
   at Raven.Server.ServerWide.ServerStore.Initialize() in C:\Builds\RavenDB-Stable-4.1\41010\src\Raven.Server\ServerWide\ServerStore.cs:line 566
   --- End of inner exception stack trace ---
   at Raven.Server.ServerWide.ServerStore.Initialize() in C:\Builds\RavenDB-Stable-4.1\41010\src\Raven.Server\ServerWide\ServerStore.cs:line 570
   at Raven.Server.RavenServer.Initialize() in C:\Builds\RavenDB-Stable-4.1\41010\src\Raven.Server\RavenServer.cs:line 261
   at Raven.Server.Program.Main(String[] args) in C:\Builds\RavenDB-Stable-4.1\41010\src\Raven.Server\Program.cs:line 149

The referred 0000000000000000034.journal file doesn't exist. In that folder I've got only 0000000000000000035.journal file.

However, v4.1.3 is running completely fine when I restored all the files from backup.

The issue is reproducible on another computer.

Derek den Haas

Apr 11, 2019, 1:37:44 AM4/11/19
to RavenDB - 2nd generation document database
Please do exactly as described, make an export, reboot to normal mode (without the Storage.Dangerous flag) and delete and import the databases.

The given solution should work.

Op donderdag 11 april 2019 02:52:56 UTC+2 schreef Alexander Klaus:

Egor Shamanaev

Apr 11, 2019, 2:28:59 AM4/11/19
to rav...@googlegroups.com
We have added additional validation in v4.1.4 as we figured out that we had an edge-case issue with potentially removing journals that hasn't been synced yet. Your data are already affected and it has been detected after the upgrade to 4.1.4. As mentioned above you can follow the instructions in the error message to recover from it.

The issue is described here: https://ayende.com/blog/186273-C/production-postmortem-this-data-corruption-bug-requires-3-simultaneous-race-conditions  

You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To post to this group, send email to rav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/e2746793-102b-46ae-a3df-ca40cfcab5fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
0 new messages