]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Add back NewEmptyIterator (#5203)
authorYanqin Jin <yanqin@fb.com>
Wed, 17 Apr 2019 03:24:52 +0000 (20:24 -0700)
committerYanqin Jin <yanqin@fb.com>
Wed, 17 Apr 2019 16:40:28 +0000 (09:40 -0700)
Summary:
#4905 removed the implementation of `NewEmptyIterator` but kept its
declaration in the public header. This breaks some systems that depend on
RocksDB if the systems use `NewEmptyIterator`. Therefore, add it back to fix. cc maysamyabandeh please remind me if I miss anything here. Thanks
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5203

Differential Revision: D14968382

Pulled By: riversand963

fbshipit-source-id: 5fb86e99c8cfaf9f7a9473cdb1355d7558ff6e01

table/iterator.cc

index e42ca260b3208fcfb29ff057e74036a795b9c8dc..0475b9d1342fc012ad5c3f1f37fad6e20965fd38 100644 (file)
@@ -157,6 +157,8 @@ class EmptyInternalIterator : public InternalIteratorBase<TValue> {
 };
 }  // namespace
 
+Iterator* NewEmptyIterator() { return new EmptyIterator(Status::OK()); }
+
 Iterator* NewErrorIterator(const Status& status) {
   return new EmptyIterator(status);
 }