LevelDB storage engine MS1
This page describes what will be implemented for milestone#1.
Contents
Feature Description
How the data is stored in LevelDB
One leveldb instance
We will use one LevelDB instance for mysqld process. LevelDB keys will be prefixed with 'dbname.table_name.PRIMARY' for the table itself, and 'dbname.table_name.index_name' for the secondary indexes. This allows to store arbitrary number of tables/indexes in one LevelDB instance.
Secondary indexes
Non-unique secondary indexes will be supported. (more on this subsequent sections)
TODO: is it ok to not support unique secondary indexes in MS1?
Data encoding
We will rely on LevelDB's compression to make the storage compact. Data that goes into LevelDB's key will be stored in KeyTupleFormat (which allows mysql's lookup/index ordering functions to work). Data that goes into LevelDB's value will be stored in table->record[0] format, except blobs. (Blobs will require special storage convention because they store a char* pointer in table->record[0]).
Concurrency handling
.