Add CreateColumnFamilyWithImport to `StackableDB` and `DBImplReadOnly` (#11556)

Summary:
https://github.com/facebook/rocksdb/issues/11378 added a new overloaded `CreateColumnFamilyWithImport` API and updated the virtual function in `StackableDB` and `DBImplReadOnly` to the newly overloaded one. This caused internal error when there is a derived class that tries to override the original `CreateColumnFamilyWithImport` function. This PR adds the original `CreateColumnFamilyWithImport` function back to `StackableDB` and `DBImplReadOnly`.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11556

Test Plan: check if this fixes an internal build

Reviewed By: akankshamahajan15

Differential Revision: D46980506

Pulled By: cbi42

fbshipit-source-id: 975a6c5748bf9481499a62ee5997ca59e542e3bc
oxigraph-main
Changyu Bi 1 year ago committed by Facebook GitHub Bot
parent fbd2f563bb
commit ca50ccc71a
  1. 9
      db/db_impl/db_impl_readonly.h
  2. 9
      include/rocksdb/utilities/stackable_db.h

@ -133,6 +133,15 @@ class DBImplReadOnly : public DBImpl {
} }
using DB::CreateColumnFamilyWithImport; using DB::CreateColumnFamilyWithImport;
virtual Status CreateColumnFamilyWithImport(
const ColumnFamilyOptions& /*options*/,
const std::string& /*column_family_name*/,
const ImportColumnFamilyOptions& /*import_options*/,
const ExportImportFilesMetaData& /*metadata*/,
ColumnFamilyHandle** /*handle*/) override {
return Status::NotSupported("Not supported operation in read only mode.");
}
virtual Status CreateColumnFamilyWithImport( virtual Status CreateColumnFamilyWithImport(
const ColumnFamilyOptions& /*options*/, const ColumnFamilyOptions& /*options*/,
const std::string& /*column_family_name*/, const std::string& /*column_family_name*/,

@ -169,6 +169,15 @@ class StackableDB : public DB {
} }
using DB::CreateColumnFamilyWithImport; using DB::CreateColumnFamilyWithImport;
virtual Status CreateColumnFamilyWithImport(
const ColumnFamilyOptions& options, const std::string& column_family_name,
const ImportColumnFamilyOptions& import_options,
const ExportImportFilesMetaData& metadata,
ColumnFamilyHandle** handle) override {
return db_->CreateColumnFamilyWithImport(options, column_family_name,
import_options, metadata, handle);
}
virtual Status CreateColumnFamilyWithImport( virtual Status CreateColumnFamilyWithImport(
const ColumnFamilyOptions& options, const std::string& column_family_name, const ColumnFamilyOptions& options, const std::string& column_family_name,
const ImportColumnFamilyOptions& import_options, const ImportColumnFamilyOptions& import_options,

Loading…
Cancel
Save