Xodus started in 2010, Git history on those goes at least to 2013.
Log is very interesting part (for MapDB):
Xodus stores data in rolling log files. Log entries (pages) are identified by one-byte headers.
BTree headers are here:
All files are fixed size. If inserted record does not fit into file size, file is padded with empty entries and new file is started.
Only small records (pages) are stored directly in log. Large records (pages) are placed into separate file in dedicated directory (blob stororage)
Each record (page) is identified by 8byte address, that identifies log file and its offset.
Set log end, discard higher files. Used for rollback and tx flush?:
Append record (page), return address:
jetbrains.exodus.log.Log#write(byte, int, jetbrains.exodus.ByteIterable)
Example of log replay:
Flush and close:
Log garbage collection job:
Binary search in BTree:
Save BTree Page:
BTree Page put:
BTree Page delete: