Proposal of LMDB-based journal.
Key features:
- all journals for all zones are in a single LMDB database (defaults to storage/journal; 1G size)
- the occupied space is measured per zone
- old changesets get preserved after zone flush until we run out of space
- if zone flushing is disabled and journal gets full, it tries to free up space by merging older changesets
- all changes are done by transactions, resulting in always-consistent DB (but some mutexes still necessary for opening DB && for keeping zone contents consistent with journal)
- kjournalprint provides a way to list zones in journal
- old journal is automatically imported, but the configuration needs to be updated manually
Caveats:
- not tested enough, needs experience from some "real" env