Skip to content
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

Inconsistent .close() behavior for HTreeMap with .memoryDB() and .heapDB() #954

Open
puzpuzpuz opened this issue Aug 5, 2019 · 0 comments

Comments

@puzpuzpuz
Copy link

puzpuzpuz commented Aug 5, 2019

The DB#close() method behaves in inconsistent manner in MapDB 3.0.7 behavior for HTreeMap with .memoryDB() and .heapDB().

Here is a simple reproducer:

DB db = DBMaker.memoryDB()
               .make();
HTreeMap<String, String> store = db.hashMap(TREE_NAME)
                                   .keySerializer(Serializer.STRING)
                                   .valueSerializer(Serializer.STRING)
                                   .create();
store.close();
// the next call throws java.lang.IllegalAccessError:
store.put("foo", "bar");

If you change .memoryDB() to .heapDB() the exception is not thrown (you can continue to call any operations on the store as if it's not closed). I'd expect the behavior to be the same, despite of the store type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant