Xodus started in 2010, Git history on those goes at least to 2013.
Log is very interesting part (for MapDB): jetbrains.exodus.log.Log
Storage description:
Xodus stores data in rolling log files. Log entries (pages) are identified by one-byte headers.
BTree headers are here: jetbrains.exodus.tree.btree.BTree#loadRootPage
.
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.
Some code:
Consistency check: jetbrains.exodus.log.Log#checkLogConsistency
Set log end, discard higher files. Used for rollback and tx flush?: jetbrains.exodus.log.Log#setHighAddress
Append record (page), return address: jetbrains.exodus.log.Log#write(byte, int, jetbrains.exodus.ByteIterable)
Example of log replay: jetbrains.exodus.log.Log#getFirstLoggableOfType
Flush and close: jetbrains.exodus.log.Log#flush(boolean)
File remove: jetbrains.exodus.log.Log#removeFile(long, jetbrains.exodus.io.RemoveBlockType)
Log garbage collection job: jetbrains.exodus.gc.CleanWholeLogJob#execute
Code:
Binary search in BTree: jetbrains.exodus.tree.btree.BasePageImmutable#binarySearch(jetbrains.exodus.ByteIterable, int)
Save BTree Page: jetbrains.exodus.tree.btree.BasePageMutable#save
BTree Page put: jetbrains.exodus.tree.btree.BottomPageMutable#put
and jetbrains.exodus.tree.btree.InternalPageMutable#put
BTree Page delete: jetbrains.exodus.tree.btree.BottomPageMutable#delete
and jetbrains.exodus.tree.btree.InternalPageMutable#delete