diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java index 91d2932..ea936b9 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java @@ -572,7 +572,7 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase { } snapshotsHandles.forEach((id, snapshot) -> { try { - if (db.isOwningHandle() && snapshot.isOwningHandle()) { + if (db.isOwningHandle()) { db.releaseSnapshot(snapshot); } } catch (Exception ex2) { @@ -1058,9 +1058,6 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase { if (!db.isOwningHandle()) { return null; } - if (!dbSnapshot.isOwningHandle()) { - return null; - } db.releaseSnapshot(dbSnapshot); return null; } finally {