make all DB::Get overloads virtual

Summary:
some fbcode services override it, we need to keep it virtual.

original change: #1756
Closes https://github.com/facebook/rocksdb/pull/2065

Differential Revision: D4808123

Pulled By: ajkr

fbshipit-source-id: 5eaeea7
main
Andrew Kryczka 7 years ago committed by Facebook Github Bot
parent 6401a8b76b
commit 4e0065015d
  1. 8
      include/rocksdb/db.h
  2. 1
      utilities/document/document_db.cc

@ -280,9 +280,9 @@ class DB {
// a status for which Status::IsNotFound() returns true.
//
// May return some other Status on an error.
inline Status Get(const ReadOptions& options,
ColumnFamilyHandle* column_family, const Slice& key,
std::string* value) {
virtual inline Status Get(const ReadOptions& options,
ColumnFamilyHandle* column_family, const Slice& key,
std::string* value) {
assert(value != nullptr);
PinnableSlice pinnable_val(value);
assert(!pinnable_val.IsPinned());
@ -607,7 +607,7 @@ class DB {
virtual bool GetAggregatedIntProperty(const Slice& property,
uint64_t* value) = 0;
// Flags for DB::GetSizeApproximation that specify whether memtable
// Flags for DB::GetSizeApproximation that specify whether memtable
// stats should be included, or file stats approximation or both
enum SizeApproximationFlags : uint8_t {
NONE = 0,

@ -1037,6 +1037,7 @@ class DocumentDBImpl : public DocumentDB {
}
// RocksDB functions
using DB::Get;
virtual Status Get(const ReadOptions& options,
ColumnFamilyHandle* column_family, const Slice& key,
PinnableSlice* value) override {

Loading…
Cancel
Save