Skip to content

Commit

Permalink
Move compacted_db_impl.[c|h] to db/db_impl (facebook#8082)
Browse files Browse the repository at this point in the history
Summary:
As title. All core db implementations should stay in db_impl.

Pull Request resolved: facebook#8082

Test Plan: make check

Reviewed By: ajkr

Differential Revision: D27211442

Pulled By: riversand963

fbshipit-source-id: e0953fde75064740e899aaff7989ff033b7f5232
  • Loading branch information
riversand963 authored and facebook-github-bot committed Mar 23, 2021
1 parent e1aa8c1 commit 9f7c02d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ set(SOURCES
db/builder.cc
db/c.cc
db/column_family.cc
db/compacted_db_impl.cc
db/compaction/compaction.cc
db/compaction/compaction_iterator.cc
db/compaction/compaction_picker.cc
Expand All @@ -594,6 +593,7 @@ set(SOURCES
db/compaction/sst_partitioner.cc
db/convenience.cc
db/db_filesnapshot.cc
db/db_impl/compacted_db_impl.cc
db/db_impl/db_impl.cc
db/db_impl/db_impl_write.cc
db/db_impl/db_impl_compaction_flush.cc
Expand Down
4 changes: 2 additions & 2 deletions TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ cpp_library(
"db/builder.cc",
"db/c.cc",
"db/column_family.cc",
"db/compacted_db_impl.cc",
"db/compaction/compaction.cc",
"db/compaction/compaction_iterator.cc",
"db/compaction/compaction_job.cc",
Expand All @@ -157,6 +156,7 @@ cpp_library(
"db/compaction/sst_partitioner.cc",
"db/convenience.cc",
"db/db_filesnapshot.cc",
"db/db_impl/compacted_db_impl.cc",
"db/db_impl/db_impl.cc",
"db/db_impl/db_impl_compaction_flush.cc",
"db/db_impl/db_impl_debug.cc",
Expand Down Expand Up @@ -453,7 +453,6 @@ cpp_library(
"db/builder.cc",
"db/c.cc",
"db/column_family.cc",
"db/compacted_db_impl.cc",
"db/compaction/compaction.cc",
"db/compaction/compaction_iterator.cc",
"db/compaction/compaction_job.cc",
Expand All @@ -464,6 +463,7 @@ cpp_library(
"db/compaction/sst_partitioner.cc",
"db/convenience.cc",
"db/db_filesnapshot.cc",
"db/db_impl/compacted_db_impl.cc",
"db/db_impl/db_impl.cc",
"db/db_impl/db_impl_compaction_flush.cc",
"db/db_impl/db_impl_debug.cc",
Expand Down
3 changes: 2 additions & 1 deletion db/compacted_db_impl.cc → db/db_impl/compacted_db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// (found in the LICENSE.Apache file in the root directory).

#ifndef ROCKSDB_LITE
#include "db/compacted_db_impl.h"
#include "db/db_impl/compacted_db_impl.h"

#include "db/db_impl/db_impl.h"
#include "db/version_set.h"
Expand Down Expand Up @@ -78,6 +78,7 @@ std::vector<Status> CompactedDBImpl::MultiGet(const ReadOptions& options,
nullptr, nullptr, nullptr, true, nullptr, nullptr);
LookupKey lkey(keys[idx], kMaxSequenceNumber);
Status s = r->Get(options, lkey.internal_key(), &get_context, nullptr);
assert(static_cast<size_t>(idx) < statuses.size());
if (!s.ok() && !s.IsNotFound()) {
statuses[idx] = s;
} else {
Expand Down
2 changes: 1 addition & 1 deletion db/compacted_db_impl.h → db/db_impl/compacted_db_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CompactedDBImpl : public DBImpl {
CompactedDBImpl(const CompactedDBImpl&) = delete;
void operator=(const CompactedDBImpl&) = delete;

virtual ~CompactedDBImpl();
~CompactedDBImpl() override;

static Status Open(const Options& options, const std::string& dbname,
DB** dbptr);
Expand Down
2 changes: 1 addition & 1 deletion db/db_impl/db_impl_readonly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "db/db_impl/db_impl_readonly.h"

#include "db/arena_wrapped_db_iter.h"
#include "db/compacted_db_impl.h"
#include "db/db_impl/compacted_db_impl.h"
#include "db/db_impl/db_impl.h"
#include "db/db_iter.h"
#include "db/merge_context.h"
Expand Down
2 changes: 1 addition & 1 deletion src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ LIB_SOURCES = \
db/builder.cc \
db/c.cc \
db/column_family.cc \
db/compacted_db_impl.cc \
db/compaction/compaction.cc \
db/compaction/compaction_iterator.cc \
db/compaction/compaction_job.cc \
Expand All @@ -28,6 +27,7 @@ LIB_SOURCES = \
db/compaction/sst_partitioner.cc \
db/convenience.cc \
db/db_filesnapshot.cc \
db/db_impl/compacted_db_impl.cc \
db/db_impl/db_impl.cc \
db/db_impl/db_impl_compaction_flush.cc \
db/db_impl/db_impl_debug.cc \
Expand Down

0 comments on commit 9f7c02d

Please sign in to comment.