From 4e0065015d3dab1d94ef7cb2b4b1d1fecfa0e926 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Thu, 30 Mar 2017 23:27:42 -0700 Subject: [PATCH] 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 --- include/rocksdb/db.h | 8 ++++---- utilities/document/document_db.cc | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/rocksdb/db.h b/include/rocksdb/db.h index 550b35135..8407e0ea5 100644 --- a/include/rocksdb/db.h +++ b/include/rocksdb/db.h @@ -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, diff --git a/utilities/document/document_db.cc b/utilities/document/document_db.cc index dacf58205..30d367206 100644 --- a/utilities/document/document_db.cc +++ b/utilities/document/document_db.cc @@ -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 {