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
I encountered an unexpected behavior when using MapDB 3.0.9 .
According to the documentation and design of MapDB, closing an HTreeMap instance should not affect the associated DB instance. The HTreeMap should no longer be usable after its close method is called, but the associated DB instance should remain open and usable.
However, I observed that when I close an HTreeMap, the DB instance also gets closed. Specifically, after closing an HTreeMap, calling DB.getAllNames throws an exception indicating that the DB was closed.
Here's a snippet of the code that reproduces the problem:
DB db = DBMaker.memoryDB().make();
HTreeMap<String, String> map = db.hashMap("map").createOrOpen();
// use the map...
map.put("key", "value");
// close the map
map.close();
// this throws an exception, saying that the DB was closed
db.getAllNames();
This behavior does not align with the design of MapDB, and I believe it's a bug. The DB should remain open even after the associated HTreeMap is closed. Please kindly look into this issue. Thank you.
The text was updated successfully, but these errors were encountered:
I encountered an unexpected behavior when using MapDB 3.0.9 .
According to the documentation and design of MapDB, closing an HTreeMap instance should not affect the associated DB instance. The HTreeMap should no longer be usable after its close method is called, but the associated DB instance should remain open and usable.
However, I observed that when I close an HTreeMap, the DB instance also gets closed. Specifically, after closing an HTreeMap, calling DB.getAllNames throws an exception indicating that the DB was closed.
Here's a snippet of the code that reproduces the problem:
This behavior does not align with the design of MapDB, and I believe it's a bug. The DB should remain open even after the associated HTreeMap is closed. Please kindly look into this issue. Thank you.
The text was updated successfully, but these errors were encountered: