cockroachdb/cockroach — pull request #185 by spencerkimball (2014-11-24 20:55:10+00:00)
Title: Move all cases of direct "engine" access to inline-MVCC.

This is a necessary step towards ranges which will contain time series
data, which requires merging. Efficient merging cannot be done using
our multi-row MVCC model. This change provides an inline value in the
MVCCMetadata which is used instead of a versioned value if the timestamp
is specified as zero. Inline values are replaced on successive puts and
are cleared on deletes.

The inlined values can be accessed just like versioned values, and all
MVCC operations work, modulo differences in how timestamps are interpreted.
Once a value has been written as inline, it may not be overwritten using
a timestamp for version values. Inlined values support merge.

Currently, the stats are inaccurately kept for merge, though the next
change will do benchmarks to ascertain the cost of keeping accurate
stats.