How do you guard against corruption after data left your control?
Discussion
lmdb guarantees that when you have a pointer to a page it will remain there until the lifetime of the program. It has copy on write semantics when updating records. Notes are immutable anyways so this is not a problem.