You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a test, I changed the connection mode for LiteDb from exclusive to shared. And then, operations on files started erroring out.
the code I'm using looks like this:
var fs = db.GetStorage<string>("audioFiles");
var files = fs.Find(u => u.Id.StartsWith(path));
foreach (var file in files)
{ // do something with file
}
this works fine if the connection mode is direct. If you then change the connection mode to shared, It fails when there's multiple files (at least two) - the first iteration works, on the second iteration gets you a LiteException with message
This engine instance already disposed
If you get a List instead of an Enumerable (var files = fs.Find(u => u.Id.StartsWith(path)).ToList();) it works even in shared mode.
I would expect the iteration to work in shared mode, too.
LiteDB version is 5.0.21 on .NET 8.0.7 on W11 Pro 2023H2
The text was updated successfully, but these errors were encountered:
For a test, I changed the connection mode for LiteDb from exclusive to shared. And then, operations on files started erroring out.
the code I'm using looks like this:
this works fine if the connection mode is direct. If you then change the connection mode to shared, It fails when there's multiple files (at least two) - the first iteration works, on the second iteration gets you a
LiteException
with messageIf you get a List instead of an Enumerable (
var files = fs.Find(u => u.Id.StartsWith(path)).ToList();
) it works even in shared mode.I would expect the iteration to work in shared mode, too.
LiteDB version is 5.0.21 on .NET 8.0.7 on W11 Pro 2023H2
The text was updated successfully, but these errors were encountered: