MMAP vs. pread in a real Go storage engine
When you build a storage engine in Go, sooner or later you need to answer a very plain question:
“How should the code read bytes from files?”
This sounds too low-level to matter. A database has bigger ideas: partitions, blocks, indexes, filters, compression, compaction, caches, query planning. But all of these ideas end up doing the same simple action many times:
“Read N bytes from file F at offset O.”
评论
?
参与讨论