diff --git a/HISTORY.md b/HISTORY.md index 3857eac81..79f9b2060 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,6 +7,9 @@ ### New Features * Add DB::SetDBOptions() to dynamic change base_background_compactions and max_background_compactions. +### New Features +* Added Iterator::SeekForPrev(). This new API will seek to the last key that less than or equal to the target key. + ## 4.12.0 (9/12/2016) ### Public API Change * CancelAllBackgroundWork() flushes all memtables for databases containing writes that have bypassed the WAL (writes issued with WriteOptions::disableWAL=true) before shutting down background threads. diff --git a/include/rocksdb/iterator.h b/include/rocksdb/iterator.h index 9d935b627..afc98d22b 100644 --- a/include/rocksdb/iterator.h +++ b/include/rocksdb/iterator.h @@ -72,7 +72,7 @@ class Iterator : public Cleanable { // Position at the last key in the source that at or before target // The iterator is Valid() after this call iff the source contains // an entry that comes at or before target. - virtual void SeekForPrev(const Slice& target) = 0; + virtual void SeekForPrev(const Slice& target) {} // Moves to the next entry in the source. After this call, Valid() is // true iff the iterator was not positioned at the last entry in the source.