I've got a question about using MapDB. When using MapDB with Memory mapped file and disabled transactions, will MapDB ensure durability of data even when JVM crashes or killed?
Asked
Active
Viewed 450 times
1 Answers
1
Your store will be safe if disk write cache is empty. That means file was synced to disk (call db.commit() with tx disabled) and there were no updates recently.
Otherwise it is very likely to get corrupted after JVM crash. I even added checksums to detect this corruption, and MapDB will refuse to open such file.
You could also use append-only file, which might be faster. And I am working on incremental backups (not yet finished).

Jan Kotek
- 1,084
- 7
- 4
-
Thanks for the response. I want to ensure durability and also very fast writes (50.000/s), append-only file will work for such requirement? If not this means that I've to implement some bulk commit logic at application level? – user2144247 Jul 10 '15 at 12:06