-
Notifications
You must be signed in to change notification settings - Fork 1k
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
MDB throws a MDB_NOTFOUND exception when the database directory already exists #5424
MDB throws a MDB_NOTFOUND exception when the database directory already exists #5424
Conversation
…e. Try to recreate the database even when directory exists.
…a.net into #5423_LMDB_directory_crash
src/contrib/cluster/Akka.DistributedData.LightningDB/LmdbDurableStore.cs
Show resolved
Hide resolved
{ | ||
try | ||
using (var env = GetLightningEnvironment()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well re-arrange the try...catch block to include the LMDB environment initialization code so it can catch exceptions thrown there
{ | ||
try | ||
{ | ||
foreach (var entry in _pending) | ||
using (var db = tx.OpenDatabase(DatabaseName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, rearranged the try...catch block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/contrib/cluster/Akka.DistributedData.LightningDB/LmdbDurableStore.cs
Show resolved
Hide resolved
Failed on Windows with .NET Framework. |
I can't replicate that failure locally, i think it has something to do with the test file system |
…iles were copied over
Oh, it was this problem all over again: CoreyKaylor/Lightning.NET#104 |
@@ -5,6 +5,7 @@ | |||
<PropertyGroup> | |||
<AssemblyTitle>Akka.DistributedData.Tests</AssemblyTitle> | |||
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks> | |||
<PlatformTarget>x64</PlatformTarget> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to add a comment explaining why this is necessary - feel free to add it in a new PR @Arkatufus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #5423