cockroachdb/cockroach — pull request #124 by spencerkimball (2014-10-13 21:39:05+00:00)
Title: Replace Engine.Scan with Engine.Iterate

Move to iteration-based primitive for efficiency. This is going to be
particularly useful when we start to optimize mvcc.Scan, which
currently is very, very inefficient.

Scan and ScanSnapshot are still provided as convenience functions
which take an Engine instance as a parameter. Most existing code
has been moved to use those. Other bits of code have been moved
to use the new iteration-based approach.

Fixed a bug in Batch.Scan where insufficient entries would be
returned in the event a deletion in the updates map overrode
a value in the underlying engine and the max scan parameter was
exceeded.