From 49c5a12dbee3aa65907e772b254d753c6d391da1 Mon Sep 17 00:00:00 2001 From: Vijay Nadimpalli Date: Fri, 31 May 2019 11:52:59 -0700 Subject: [PATCH] Organizing rocksdb/db directory Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/5390 Differential Revision: D15579388 Pulled By: vjnadimpalli fbshipit-source-id: 5bfc95e31554b8ff05b97b76d6534113f527f366 --- CMakeLists.txt | 42 +++++++++---------- Makefile | 10 ++--- TARGETS | 42 +++++++++---------- db/builder.cc | 2 +- db/column_family.cc | 10 ++--- db/column_family_test.cc | 2 +- db/compact_files_test.cc | 2 +- db/compacted_db_impl.cc | 2 +- db/compacted_db_impl.h | 2 +- db/{ => compaction}/compaction.cc | 3 +- db/{ => compaction}/compaction.h | 0 .../compaction_iteration_stats.h | 0 db/{ => compaction}/compaction_iterator.cc | 3 +- db/{ => compaction}/compaction_iterator.h | 4 +- .../compaction_iterator_test.cc | 2 +- db/{ => compaction}/compaction_job.cc | 4 +- db/{ => compaction}/compaction_job.h | 2 +- .../compaction_job_stats_test.cc | 2 +- db/{ => compaction}/compaction_job_test.cc | 2 +- db/{ => compaction}/compaction_picker.cc | 2 +- db/{ => compaction}/compaction_picker.h | 2 +- db/{ => compaction}/compaction_picker_fifo.cc | 2 +- db/{ => compaction}/compaction_picker_fifo.h | 2 +- .../compaction_picker_level.cc | 3 +- db/{ => compaction}/compaction_picker_level.h | 2 +- db/{ => compaction}/compaction_picker_test.cc | 9 ++-- .../compaction_picker_universal.cc | 2 +- .../compaction_picker_universal.h | 2 +- db/convenience.cc | 2 +- db/corruption_test.cc | 2 +- db/cuckoo_table_db_test.cc | 2 +- db/db_filesnapshot.cc | 2 +- db/{ => db_impl}/db_impl.cc | 4 +- db/{ => db_impl}/db_impl.h | 4 +- db/{ => db_impl}/db_impl_compaction_flush.cc | 2 +- db/{ => db_impl}/db_impl_debug.cc | 2 +- db/{ => db_impl}/db_impl_experimental.cc | 2 +- db/{ => db_impl}/db_impl_files.cc | 2 +- db/{ => db_impl}/db_impl_open.cc | 2 +- db/{ => db_impl}/db_impl_readonly.cc | 4 +- db/{ => db_impl}/db_impl_readonly.h | 2 +- db/{ => db_impl}/db_impl_secondary.cc | 2 +- db/{ => db_impl}/db_impl_secondary.h | 2 +- db/{ => db_impl}/db_impl_write.cc | 2 +- db/{ => db_impl}/db_secondary_test.cc | 2 +- db/db_iter.h | 2 +- db/db_options_test.cc | 2 +- db/db_test.cc | 2 +- db/db_test_util.h | 2 +- db/deletefile_test.cc | 2 +- db/error_handler.cc | 2 +- db/experimental.cc | 2 +- db/fault_injection_test.cc | 2 +- db/forward_iterator.cc | 2 +- db/in_memory_stats_history.cc | 2 +- db/internal_stats.cc | 2 +- db/listener_test.cc | 2 +- db/memtable_list.cc | 2 +- db/merge_test.cc | 5 ++- db/obsolete_files_test.cc | 2 +- db/options_file_test.cc | 2 +- db/plain_table_db_test.cc | 2 +- db/prefix_test.cc | 2 +- db/range_del_aggregator.cc | 2 +- db/range_del_aggregator.h | 2 +- db/repair.cc | 2 +- db/repair_test.cc | 2 +- db/table_properties_collector_test.cc | 2 +- db/version_set.cc | 2 +- db/version_set.h | 4 +- db/wal_manager_test.cc | 2 +- db/write_batch.cc | 2 +- db/write_callback_test.cc | 2 +- file/sst_file_manager_impl.cc | 2 +- file/sst_file_manager_impl.h | 2 +- src.mk | 42 +++++++++---------- table/table_reader_bench.cc | 2 +- tools/db_bench_tool.cc | 2 +- tools/db_stress.cc | 2 +- tools/ldb_cmd.cc | 3 +- tools/reduce_levels_test.cc | 2 +- tools/trace_analyzer_tool.cc | 2 +- util/trace_replay.cc | 3 +- utilities/backupable/backupable_db_test.cc | 2 +- utilities/blob_db/blob_db_impl.cc | 2 +- utilities/blob_db/blob_file.cc | 3 +- .../cassandra/cassandra_functional_test.cc | 2 +- utilities/checkpoint/checkpoint_test.cc | 2 +- utilities/debug.cc | 2 +- utilities/memory/memory_test.cc | 2 +- utilities/memory/memory_util.cc | 2 +- .../transactions/optimistic_transaction.cc | 2 +- .../optimistic_transaction_db_impl.cc | 2 +- .../transactions/pessimistic_transaction.cc | 2 +- .../pessimistic_transaction_db.cc | 2 +- utilities/transactions/transaction_base.cc | 2 +- utilities/transactions/transaction_test.cc | 2 +- utilities/transactions/transaction_test.h | 2 +- utilities/transactions/transaction_util.cc | 2 +- .../write_prepared_transaction_test.cc | 2 +- utilities/transactions/write_prepared_txn.cc | 2 +- .../transactions/write_prepared_txn_db.cc | 2 +- .../transactions/write_unprepared_txn.cc | 2 +- utilities/ttl/db_ttl_impl.h | 2 +- .../write_batch_with_index.cc | 2 +- 105 files changed, 186 insertions(+), 184 deletions(-) rename db/{ => compaction}/compaction.cc (99%) rename db/{ => compaction}/compaction.h (100%) rename db/{ => compaction}/compaction_iteration_stats.h (100%) rename db/{ => compaction}/compaction_iterator.cc (99%) rename db/{ => compaction}/compaction_iterator.h (99%) rename db/{ => compaction}/compaction_iterator_test.cc (99%) rename db/{ => compaction}/compaction_job.cc (99%) rename db/{ => compaction}/compaction_job.h (99%) rename db/{ => compaction}/compaction_job_stats_test.cc (99%) rename db/{ => compaction}/compaction_job_test.cc (99%) rename db/{ => compaction}/compaction_picker.cc (99%) rename db/{ => compaction}/compaction_picker.h (99%) rename db/{ => compaction}/compaction_picker_fifo.cc (99%) rename db/{ => compaction}/compaction_picker_fifo.h (98%) rename db/{ => compaction}/compaction_picker_level.cc (99%) rename db/{ => compaction}/compaction_picker_level.h (96%) rename db/{ => compaction}/compaction_picker_test.cc (99%) rename db/{ => compaction}/compaction_picker_universal.cc (99%) rename db/{ => compaction}/compaction_picker_universal.h (98%) rename db/{ => db_impl}/db_impl.cc (99%) rename db/{ => db_impl}/db_impl.h (99%) rename db/{ => db_impl}/db_impl_compaction_flush.cc (99%) rename db/{ => db_impl}/db_impl_debug.cc (99%) rename db/{ => db_impl}/db_impl_experimental.cc (99%) rename db/{ => db_impl}/db_impl_files.cc (99%) rename db/{ => db_impl}/db_impl_open.cc (99%) rename db/{ => db_impl}/db_impl_readonly.cc (99%) rename db/{ => db_impl}/db_impl_readonly.h (99%) rename db/{ => db_impl}/db_impl_secondary.cc (99%) rename db/{ => db_impl}/db_impl_secondary.h (99%) rename db/{ => db_impl}/db_impl_write.cc (99%) rename db/{ => db_impl}/db_secondary_test.cc (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a4d9deb1b..4c2fa7119c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -486,24 +486,24 @@ set(SOURCES db/c.cc db/column_family.cc db/compacted_db_impl.cc - db/compaction.cc - db/compaction_iterator.cc - db/compaction_job.cc - db/compaction_picker.cc - db/compaction_picker_fifo.cc - db/compaction_picker_level.cc - db/compaction_picker_universal.cc + db/compaction/compaction.cc + db/compaction/compaction_iterator.cc + db/compaction/compaction_picker.cc + db/compaction/compaction_job.cc + db/compaction/compaction_picker_fifo.cc + db/compaction/compaction_picker_level.cc + db/compaction/compaction_picker_universal.cc db/convenience.cc db/db_filesnapshot.cc - db/db_impl.cc - db/db_impl_write.cc - db/db_impl_compaction_flush.cc - db/db_impl_files.cc - db/db_impl_open.cc - db/db_impl_debug.cc - db/db_impl_experimental.cc - db/db_impl_readonly.cc - db/db_impl_secondary.cc + db/db_impl/db_impl.cc + db/db_impl/db_impl_write.cc + db/db_impl/db_impl_compaction_flush.cc + db/db_impl/db_impl_files.cc + db/db_impl/db_impl_open.cc + db/db_impl/db_impl_debug.cc + db/db_impl/db_impl_experimental.cc + db/db_impl/db_impl_readonly.cc + db/db_impl/db_impl_secondary.cc db/db_info_dumper.cc db/db_iter.cc db/dbformat.cc @@ -868,10 +868,10 @@ if(WITH_TESTS) cache/lru_cache_test.cc db/column_family_test.cc db/compact_files_test.cc - db/compaction_iterator_test.cc - db/compaction_job_stats_test.cc - db/compaction_job_test.cc - db/compaction_picker_test.cc + db/compaction/compaction_job_stats_test.cc + db/compaction/compaction_job_test.cc + db/compaction/compaction_iterator_test.cc + db/compaction/compaction_picker_test.cc db/comparator_db_test.cc db/corruption_test.cc db/cuckoo_table_db_test.cc @@ -894,7 +894,7 @@ if(WITH_TESTS) db/db_options_test.cc db/db_properties_test.cc db/db_range_del_test.cc - db/db_secondary_test.cc + db/db_impl/db_secondary_test.cc db/db_sst_test.cc db/db_statistics_test.cc db/db_table_properties_test.cc diff --git a/Makefile b/Makefile index 244b929c41..5181154a21 100644 --- a/Makefile +++ b/Makefile @@ -1339,13 +1339,13 @@ write_batch_with_index_test: utilities/write_batch_with_index/write_batch_with_i flush_job_test: db/flush_job_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -compaction_iterator_test: db/compaction_iterator_test.o $(LIBOBJECTS) $(TESTHARNESS) +compaction_iterator_test: db/compaction/compaction_iterator_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -compaction_job_test: db/compaction_job_test.o $(LIBOBJECTS) $(TESTHARNESS) +compaction_job_test: db/compaction/compaction_job_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -compaction_job_stats_test: db/compaction_job_stats_test.o $(LIBOBJECTS) $(TESTHARNESS) +compaction_job_stats_test: db/compaction/compaction_job_stats_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) compact_on_deletion_collector_test: utilities/table_properties_collectors/compact_on_deletion_collector_test.o $(LIBOBJECTS) $(TESTHARNESS) @@ -1417,7 +1417,7 @@ version_edit_test: db/version_edit_test.o $(LIBOBJECTS) $(TESTHARNESS) version_set_test: db/version_set_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -compaction_picker_test: db/compaction_picker_test.o $(LIBOBJECTS) $(TESTHARNESS) +compaction_picker_test: db/compaction/compaction_picker_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) version_builder_test: db/version_builder_test.o $(LIBOBJECTS) $(TESTHARNESS) @@ -1585,7 +1585,7 @@ range_tombstone_fragmenter_test: db/range_tombstone_fragmenter_test.o db/db_test sst_file_reader_test: table/sst_file_reader_test.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) -db_secondary_test: db/db_secondary_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) +db_secondary_test: db/db_impl/db_secondary_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) $(AM_LINK) #------------------------------------------------- diff --git a/TARGETS b/TARGETS index dc39f87bce..edddc7b99b 100644 --- a/TARGETS +++ b/TARGETS @@ -83,24 +83,24 @@ cpp_library( "db/c.cc", "db/column_family.cc", "db/compacted_db_impl.cc", - "db/compaction.cc", - "db/compaction_iterator.cc", - "db/compaction_job.cc", - "db/compaction_picker.cc", - "db/compaction_picker_fifo.cc", - "db/compaction_picker_level.cc", - "db/compaction_picker_universal.cc", + "db/compaction/compaction.cc", + "db/compaction/compaction_iterator.cc", + "db/compaction/compaction_job.cc", + "db/compaction/compaction_picker.cc", + "db/compaction/compaction_picker_fifo.cc", + "db/compaction/compaction_picker_level.cc", + "db/compaction/compaction_picker_universal.cc", "db/convenience.cc", "db/db_filesnapshot.cc", - "db/db_impl.cc", - "db/db_impl_compaction_flush.cc", - "db/db_impl_debug.cc", - "db/db_impl_experimental.cc", - "db/db_impl_files.cc", - "db/db_impl_open.cc", - "db/db_impl_readonly.cc", - "db/db_impl_secondary.cc", - "db/db_impl_write.cc", + "db/db_impl/db_impl.cc", + "db/db_impl/db_impl_compaction_flush.cc", + "db/db_impl/db_impl_debug.cc", + "db/db_impl/db_impl_experimental.cc", + "db/db_impl/db_impl_files.cc", + "db/db_impl/db_impl_open.cc", + "db/db_impl/db_impl_readonly.cc", + "db/db_impl/db_impl_secondary.cc", + "db/db_impl/db_impl_write.cc", "db/db_info_dumper.cc", "db/db_iter.cc", "db/dbformat.cc", @@ -454,22 +454,22 @@ ROCKS_TESTS = [ ], [ "compaction_iterator_test", - "db/compaction_iterator_test.cc", + "db/compaction/compaction_iterator_test.cc", "serial", ], [ "compaction_job_stats_test", - "db/compaction_job_stats_test.cc", + "db/compaction/compaction_job_stats_test.cc", "serial", ], [ "compaction_job_test", - "db/compaction_job_test.cc", + "db/compaction/compaction_job_test.cc", "serial", ], [ "compaction_picker_test", - "db/compaction_picker_test.cc", + "db/compaction/compaction_picker_test.cc", "serial", ], [ @@ -609,7 +609,7 @@ ROCKS_TESTS = [ ], [ "db_secondary_test", - "db/db_secondary_test.cc", + "db/db_impl/db_secondary_test.cc", "serial", ], [ diff --git a/db/builder.cc b/db/builder.cc index 86aac02ab7..67d764ad18 100644 --- a/db/builder.cc +++ b/db/builder.cc @@ -13,7 +13,7 @@ #include #include -#include "db/compaction_iterator.h" +#include "db/compaction/compaction_iterator.h" #include "db/dbformat.h" #include "db/event_helpers.h" #include "db/internal_stats.h" diff --git a/db/column_family.cc b/db/column_family.cc index fde1996aea..ce22a00aac 100644 --- a/db/column_family.cc +++ b/db/column_family.cc @@ -19,11 +19,11 @@ #include #include -#include "db/compaction_picker.h" -#include "db/compaction_picker_fifo.h" -#include "db/compaction_picker_level.h" -#include "db/compaction_picker_universal.h" -#include "db/db_impl.h" +#include "db/compaction/compaction_picker.h" +#include "db/compaction/compaction_picker_fifo.h" +#include "db/compaction/compaction_picker_level.h" +#include "db/compaction/compaction_picker_universal.h" +#include "db/db_impl/db_impl.h" #include "db/internal_stats.h" #include "db/job_context.h" #include "db/range_del_aggregator.h" diff --git a/db/column_family_test.cc b/db/column_family_test.cc index 21b3321bea..9374a13586 100644 --- a/db/column_family_test.cc +++ b/db/column_family_test.cc @@ -12,8 +12,8 @@ #include #include -#include "db/db_impl.h" #include "db/db_test_util.h" +#include "db/db_impl/db_impl.h" #include "memtable/hash_skiplist_rep.h" #include "options/options_parser.h" #include "port/port.h" diff --git a/db/compact_files_test.cc b/db/compact_files_test.cc index 438fdb7c96..92975da87c 100644 --- a/db/compact_files_test.cc +++ b/db/compact_files_test.cc @@ -10,7 +10,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "port/port.h" #include "rocksdb/db.h" #include "rocksdb/env.h" diff --git a/db/compacted_db_impl.cc b/db/compacted_db_impl.cc index acdaad4ec2..88928391ad 100644 --- a/db/compacted_db_impl.cc +++ b/db/compacted_db_impl.cc @@ -5,7 +5,7 @@ #ifndef ROCKSDB_LITE #include "db/compacted_db_impl.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/version_set.h" #include "table/get_context.h" diff --git a/db/compacted_db_impl.h b/db/compacted_db_impl.h index 5c574b4b9a..8c1a1428c8 100644 --- a/db/compacted_db_impl.h +++ b/db/compacted_db_impl.h @@ -5,7 +5,7 @@ #pragma once #ifndef ROCKSDB_LITE -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include #include diff --git a/db/compaction.cc b/db/compaction/compaction.cc similarity index 99% rename from db/compaction.cc rename to db/compaction/compaction.cc index 089dd66848..5dc7e83c8f 100644 --- a/db/compaction.cc +++ b/db/compaction/compaction.cc @@ -7,8 +7,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/compaction.h" - #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif @@ -17,6 +15,7 @@ #include #include "db/column_family.h" +#include "db/compaction/compaction.h" #include "rocksdb/compaction_filter.h" #include "test_util/sync_point.h" #include "util/string_util.h" diff --git a/db/compaction.h b/db/compaction/compaction.h similarity index 100% rename from db/compaction.h rename to db/compaction/compaction.h diff --git a/db/compaction_iteration_stats.h b/db/compaction/compaction_iteration_stats.h similarity index 100% rename from db/compaction_iteration_stats.h rename to db/compaction/compaction_iteration_stats.h diff --git a/db/compaction_iterator.cc b/db/compaction/compaction_iterator.cc similarity index 99% rename from db/compaction_iterator.cc rename to db/compaction/compaction_iterator.cc index 7e06096996..135018f514 100644 --- a/db/compaction_iterator.cc +++ b/db/compaction/compaction_iterator.cc @@ -3,8 +3,7 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "db/compaction_iterator.h" - +#include "db/compaction/compaction_iterator.h" #include "db/snapshot_checker.h" #include "port/likely.h" #include "rocksdb/listener.h" diff --git a/db/compaction_iterator.h b/db/compaction/compaction_iterator.h similarity index 99% rename from db/compaction_iterator.h rename to db/compaction/compaction_iterator.h index 6ab43b1bec..9744ab8dfc 100644 --- a/db/compaction_iterator.h +++ b/db/compaction/compaction_iterator.h @@ -10,8 +10,8 @@ #include #include -#include "db/compaction.h" -#include "db/compaction_iteration_stats.h" +#include "db/compaction/compaction_iteration_stats.h" +#include "db/compaction/compaction.h" #include "db/merge_helper.h" #include "db/pinned_iterators_manager.h" #include "db/range_del_aggregator.h" diff --git a/db/compaction_iterator_test.cc b/db/compaction/compaction_iterator_test.cc similarity index 99% rename from db/compaction_iterator_test.cc rename to db/compaction/compaction_iterator_test.cc index 99bb026b5a..ddda79a4cf 100644 --- a/db/compaction_iterator_test.cc +++ b/db/compaction/compaction_iterator_test.cc @@ -3,11 +3,11 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "db/compaction_iterator.h" #include #include +#include "db/compaction/compaction_iterator.h" #include "port/port.h" #include "test_util/testharness.h" #include "test_util/testutil.h" diff --git a/db/compaction_job.cc b/db/compaction/compaction_job.cc similarity index 99% rename from db/compaction_job.cc rename to db/compaction/compaction_job.cc index 92a6fab8da..3866d70ee0 100644 --- a/db/compaction_job.cc +++ b/db/compaction/compaction_job.cc @@ -7,7 +7,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/compaction_job.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS @@ -24,8 +23,9 @@ #include #include +#include "db/compaction/compaction_job.h" #include "db/builder.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/db_iter.h" #include "db/dbformat.h" #include "db/error_handler.h" diff --git a/db/compaction_job.h b/db/compaction/compaction_job.h similarity index 99% rename from db/compaction_job.h rename to db/compaction/compaction_job.h index 0751727d70..1387fffb1c 100644 --- a/db/compaction_job.h +++ b/db/compaction/compaction_job.h @@ -18,7 +18,7 @@ #include #include "db/column_family.h" -#include "db/compaction_iterator.h" +#include "db/compaction/compaction_iterator.h" #include "db/dbformat.h" #include "db/flush_scheduler.h" #include "db/internal_stats.h" diff --git a/db/compaction_job_stats_test.cc b/db/compaction/compaction_job_stats_test.cc similarity index 99% rename from db/compaction_job_stats_test.cc rename to db/compaction/compaction_job_stats_test.cc index 35c1100f99..91310e9f11 100644 --- a/db/compaction_job_stats_test.cc +++ b/db/compaction/compaction_job_stats_test.cc @@ -21,7 +21,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/dbformat.h" #include "db/job_context.h" #include "db/version_set.h" diff --git a/db/compaction_job_test.cc b/db/compaction/compaction_job_test.cc similarity index 99% rename from db/compaction_job_test.cc rename to db/compaction/compaction_job_test.cc index 93e55b7a03..838cda5eac 100644 --- a/db/compaction_job_test.cc +++ b/db/compaction/compaction_job_test.cc @@ -17,7 +17,7 @@ #include #include "db/column_family.h" -#include "db/compaction_job.h" +#include "db/compaction/compaction_job.h" #include "db/error_handler.h" #include "db/version_set.h" #include "rocksdb/cache.h" diff --git a/db/compaction_picker.cc b/db/compaction/compaction_picker.cc similarity index 99% rename from db/compaction_picker.cc rename to db/compaction/compaction_picker.cc index bfe13828b1..4276ea9cb4 100644 --- a/db/compaction_picker.cc +++ b/db/compaction/compaction_picker.cc @@ -7,7 +7,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/compaction_picker.h" +#include "db/compaction/compaction_picker.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS diff --git a/db/compaction_picker.h b/db/compaction/compaction_picker.h similarity index 99% rename from db/compaction_picker.h rename to db/compaction/compaction_picker.h index 437c8d3047..53477014cf 100644 --- a/db/compaction_picker.h +++ b/db/compaction/compaction_picker.h @@ -15,7 +15,7 @@ #include #include -#include "db/compaction.h" +#include "db/compaction/compaction.h" #include "db/version_set.h" #include "options/cf_options.h" #include "rocksdb/env.h" diff --git a/db/compaction_picker_fifo.cc b/db/compaction/compaction_picker_fifo.cc similarity index 99% rename from db/compaction_picker_fifo.cc rename to db/compaction/compaction_picker_fifo.cc index eadb31f9ee..ffb5a9f649 100644 --- a/db/compaction_picker_fifo.cc +++ b/db/compaction/compaction_picker_fifo.cc @@ -7,7 +7,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/compaction_picker_fifo.h" +#include "db/compaction/compaction_picker_fifo.h" #ifndef ROCKSDB_LITE #ifndef __STDC_FORMAT_MACROS diff --git a/db/compaction_picker_fifo.h b/db/compaction/compaction_picker_fifo.h similarity index 98% rename from db/compaction_picker_fifo.h rename to db/compaction/compaction_picker_fifo.h index 9da107c5d4..a4e63803cf 100644 --- a/db/compaction_picker_fifo.h +++ b/db/compaction/compaction_picker_fifo.h @@ -10,7 +10,7 @@ #pragma once #ifndef ROCKSDB_LITE -#include "db/compaction_picker.h" +#include "db/compaction/compaction_picker.h" namespace rocksdb { class FIFOCompactionPicker : public CompactionPicker { diff --git a/db/compaction_picker_level.cc b/db/compaction/compaction_picker_level.cc similarity index 99% rename from db/compaction_picker_level.cc rename to db/compaction/compaction_picker_level.cc index 70fe46c5b8..aeb368ea20 100644 --- a/db/compaction_picker_level.cc +++ b/db/compaction/compaction_picker_level.cc @@ -7,8 +7,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/compaction_picker_level.h" - #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif @@ -17,6 +15,7 @@ #include #include +#include "db/compaction/compaction_picker_level.h" #include "test_util/sync_point.h" #include "util/log_buffer.h" diff --git a/db/compaction_picker_level.h b/db/compaction/compaction_picker_level.h similarity index 96% rename from db/compaction_picker_level.h rename to db/compaction/compaction_picker_level.h index 1d37fe50ea..9fc196698a 100644 --- a/db/compaction_picker_level.h +++ b/db/compaction/compaction_picker_level.h @@ -9,7 +9,7 @@ #pragma once -#include "db/compaction_picker.h" +#include "db/compaction/compaction_picker.h" namespace rocksdb { // Picking compactions for leveled compaction. See wiki page diff --git a/db/compaction_picker_test.cc b/db/compaction/compaction_picker_test.cc similarity index 99% rename from db/compaction_picker_test.cc rename to db/compaction/compaction_picker_test.cc index c3e9e450ff..bab93227a4 100644 --- a/db/compaction_picker_test.cc +++ b/db/compaction/compaction_picker_test.cc @@ -3,15 +3,14 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "db/compaction_picker.h" #include #include #include -#include "db/compaction.h" -#include "db/compaction_picker_fifo.h" -#include "db/compaction_picker_level.h" -#include "db/compaction_picker_universal.h" +#include "db/compaction/compaction.h" +#include "db/compaction/compaction_picker_fifo.h" +#include "db/compaction/compaction_picker_level.h" +#include "db/compaction/compaction_picker_universal.h" #include "test_util/testharness.h" #include "test_util/testutil.h" diff --git a/db/compaction_picker_universal.cc b/db/compaction/compaction_picker_universal.cc similarity index 99% rename from db/compaction_picker_universal.cc rename to db/compaction/compaction_picker_universal.cc index 20edd30748..465245715f 100644 --- a/db/compaction_picker_universal.cc +++ b/db/compaction/compaction_picker_universal.cc @@ -7,7 +7,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/compaction_picker_universal.h" +#include "db/compaction/compaction_picker_universal.h" #ifndef ROCKSDB_LITE #ifndef __STDC_FORMAT_MACROS diff --git a/db/compaction_picker_universal.h b/db/compaction/compaction_picker_universal.h similarity index 98% rename from db/compaction_picker_universal.h rename to db/compaction/compaction_picker_universal.h index 375e5998e2..2c44735d95 100644 --- a/db/compaction_picker_universal.h +++ b/db/compaction/compaction_picker_universal.h @@ -10,7 +10,7 @@ #pragma once #ifndef ROCKSDB_LITE -#include "db/compaction_picker.h" +#include "db/compaction/compaction_picker.h" namespace rocksdb { class UniversalCompactionPicker : public CompactionPicker { diff --git a/db/convenience.cc b/db/convenience.cc index 71c237f60c..c11653fb19 100644 --- a/db/convenience.cc +++ b/db/convenience.cc @@ -8,7 +8,7 @@ #include "rocksdb/convenience.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "util/cast_util.h" namespace rocksdb { diff --git a/db/corruption_test.cc b/db/corruption_test.cc index 53c4d42d28..9e83c9080e 100644 --- a/db/corruption_test.cc +++ b/db/corruption_test.cc @@ -16,7 +16,7 @@ #include #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/log_format.h" #include "db/version_set.h" #include "file/filename.h" diff --git a/db/cuckoo_table_db_test.cc b/db/cuckoo_table_db_test.cc index 6f60e2d703..135a34c2e0 100644 --- a/db/cuckoo_table_db_test.cc +++ b/db/cuckoo_table_db_test.cc @@ -5,7 +5,7 @@ #ifndef ROCKSDB_LITE -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/env.h" #include "table/cuckoo/cuckoo_table_factory.h" diff --git a/db/db_filesnapshot.cc b/db/db_filesnapshot.cc index 59757aeb9f..ac544793ee 100644 --- a/db/db_filesnapshot.cc +++ b/db/db_filesnapshot.cc @@ -14,7 +14,7 @@ #include #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/job_context.h" #include "db/version_set.h" #include "file/file_util.h" diff --git a/db/db_impl.cc b/db/db_impl/db_impl.cc similarity index 99% rename from db/db_impl.cc rename to db/db_impl/db_impl.cc index 5534c225f4..196e38f14f 100644 --- a/db/db_impl.cc +++ b/db/db_impl/db_impl.cc @@ -6,7 +6,7 @@ // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS @@ -28,7 +28,7 @@ #include #include "db/builder.h" -#include "db/compaction_job.h" +#include "db/compaction/compaction_job.h" #include "db/db_info_dumper.h" #include "db/db_iter.h" #include "db/dbformat.h" diff --git a/db/db_impl.h b/db/db_impl/db_impl.h similarity index 99% rename from db/db_impl.h rename to db/db_impl/db_impl.h index 4c418d6f38..27d39f90d2 100644 --- a/db/db_impl.h +++ b/db/db_impl/db_impl.h @@ -20,7 +20,7 @@ #include #include "db/column_family.h" -#include "db/compaction_job.h" +#include "db/compaction/compaction_job.h" #include "db/dbformat.h" #include "db/error_handler.h" #include "db/event_helpers.h" @@ -39,7 +39,7 @@ #include "db/wal_manager.h" #include "db/write_controller.h" #include "db/write_thread.h" -#include "memtable_list.h" +#include "db/memtable_list.h" #include "monitoring/instrumented_mutex.h" #include "options/db_options.h" #include "port/port.h" diff --git a/db/db_impl_compaction_flush.cc b/db/db_impl/db_impl_compaction_flush.cc similarity index 99% rename from db/db_impl_compaction_flush.cc rename to db/db_impl/db_impl_compaction_flush.cc index c6025a8cc5..881fa26af3 100644 --- a/db/db_impl_compaction_flush.cc +++ b/db/db_impl/db_impl_compaction_flush.cc @@ -6,7 +6,7 @@ // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS diff --git a/db/db_impl_debug.cc b/db/db_impl/db_impl_debug.cc similarity index 99% rename from db/db_impl_debug.cc rename to db/db_impl/db_impl_debug.cc index f558971190..4b558facb3 100644 --- a/db/db_impl_debug.cc +++ b/db/db_impl/db_impl_debug.cc @@ -9,7 +9,7 @@ #ifndef NDEBUG -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/error_handler.h" #include "monitoring/thread_status_updater.h" diff --git a/db/db_impl_experimental.cc b/db/db_impl/db_impl_experimental.cc similarity index 99% rename from db/db_impl_experimental.cc rename to db/db_impl/db_impl_experimental.cc index 47a880199e..a8fed40be0 100644 --- a/db/db_impl_experimental.cc +++ b/db/db_impl/db_impl_experimental.cc @@ -7,7 +7,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS diff --git a/db/db_impl_files.cc b/db/db_impl/db_impl_files.cc similarity index 99% rename from db/db_impl_files.cc rename to db/db_impl/db_impl_files.cc index 64c6dc9687..608c8ce494 100644 --- a/db/db_impl_files.cc +++ b/db/db_impl/db_impl_files.cc @@ -6,7 +6,7 @@ // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS diff --git a/db/db_impl_open.cc b/db/db_impl/db_impl_open.cc similarity index 99% rename from db/db_impl_open.cc rename to db/db_impl/db_impl_open.cc index 5dae140c7e..5019221b5c 100644 --- a/db/db_impl_open.cc +++ b/db/db_impl/db_impl_open.cc @@ -6,7 +6,7 @@ // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS diff --git a/db/db_impl_readonly.cc b/db/db_impl/db_impl_readonly.cc similarity index 99% rename from db/db_impl_readonly.cc rename to db/db_impl/db_impl_readonly.cc index 5d7515c28e..5524922845 100644 --- a/db/db_impl_readonly.cc +++ b/db/db_impl/db_impl_readonly.cc @@ -3,12 +3,12 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "db/db_impl_readonly.h" +#include "db/db_impl/db_impl_readonly.h" #include "db/compacted_db_impl.h" -#include "db/db_impl.h" #include "db/db_iter.h" #include "db/merge_context.h" +#include "db/db_impl/db_impl.h" #include "monitoring/perf_context_imp.h" namespace rocksdb { diff --git a/db/db_impl_readonly.h b/db/db_impl/db_impl_readonly.h similarity index 99% rename from db/db_impl_readonly.h rename to db/db_impl/db_impl_readonly.h index 23816210dc..18df900cba 100644 --- a/db/db_impl_readonly.h +++ b/db/db_impl/db_impl_readonly.h @@ -9,7 +9,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" namespace rocksdb { diff --git a/db/db_impl_secondary.cc b/db/db_impl/db_impl_secondary.cc similarity index 99% rename from db/db_impl_secondary.cc rename to db/db_impl/db_impl_secondary.cc index a8ea921a26..a976a5750d 100644 --- a/db/db_impl_secondary.cc +++ b/db/db_impl/db_impl_secondary.cc @@ -3,7 +3,7 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "db/db_impl_secondary.h" +#include "db/db_impl/db_impl_secondary.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS diff --git a/db/db_impl_secondary.h b/db/db_impl/db_impl_secondary.h similarity index 99% rename from db/db_impl_secondary.h rename to db/db_impl/db_impl_secondary.h index a57835432d..24cfd33c11 100644 --- a/db/db_impl_secondary.h +++ b/db/db_impl/db_impl_secondary.h @@ -9,7 +9,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" namespace rocksdb { diff --git a/db/db_impl_write.cc b/db/db_impl/db_impl_write.cc similarity index 99% rename from db/db_impl_write.cc rename to db/db_impl/db_impl_write.cc index 98463f7b27..02e23e2693 100644 --- a/db/db_impl_write.cc +++ b/db/db_impl/db_impl_write.cc @@ -6,7 +6,7 @@ // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS diff --git a/db/db_secondary_test.cc b/db/db_impl/db_secondary_test.cc similarity index 99% rename from db/db_secondary_test.cc rename to db/db_impl/db_secondary_test.cc index 23132434f1..c9184281c2 100644 --- a/db/db_secondary_test.cc +++ b/db/db_impl/db_secondary_test.cc @@ -7,8 +7,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/db_impl_secondary.h" #include "db/db_test_util.h" +#include "db/db_impl/db_impl_secondary.h" #include "port/stack_trace.h" #include "test_util/fault_injection_test_env.h" #include "test_util/sync_point.h" diff --git a/db/db_iter.h b/db/db_iter.h index 85b546c544..9a6df9610a 100644 --- a/db/db_iter.h +++ b/db/db_iter.h @@ -10,10 +10,10 @@ #pragma once #include #include -#include "db/db_impl.h" #include "db/dbformat.h" #include "db/range_del_aggregator.h" #include "memory/arena.h" +#include "db/db_impl/db_impl.h" #include "options/cf_options.h" #include "rocksdb/db.h" #include "rocksdb/iterator.h" diff --git a/db/db_options_test.cc b/db/db_options_test.cc index b899ba18b4..36ecf3a1b5 100644 --- a/db/db_options_test.cc +++ b/db/db_options_test.cc @@ -11,8 +11,8 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" #include "db/db_test_util.h" +#include "db/db_impl/db_impl.h" #include "options/options_helper.h" #include "port/stack_trace.h" #include "rocksdb/cache.h" diff --git a/db/db_test.cc b/db/db_test.cc index debb2ba603..4c4bd382ca 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -24,7 +24,7 @@ #endif #include "cache/lru_cache.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/db_test_util.h" #include "db/dbformat.h" #include "db/job_context.h" diff --git a/db/db_test_util.h b/db/db_test_util.h index 2af202fad9..4e9fcafadf 100644 --- a/db/db_test_util.h +++ b/db/db_test_util.h @@ -25,7 +25,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/dbformat.h" #include "env/mock_env.h" #include "file/filename.h" diff --git a/db/deletefile_test.cc b/db/deletefile_test.cc index 280d269f1c..18014e5b43 100644 --- a/db/deletefile_test.cc +++ b/db/deletefile_test.cc @@ -13,7 +13,7 @@ #include #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/version_set.h" #include "db/write_batch_internal.h" #include "file/filename.h" diff --git a/db/error_handler.cc b/db/error_handler.cc index 140fb4850f..1d818f4894 100644 --- a/db/error_handler.cc +++ b/db/error_handler.cc @@ -4,8 +4,8 @@ // (found in the LICENSE.Apache file in the root directory). // #include "db/error_handler.h" -#include "db/db_impl.h" #include "db/event_helpers.h" +#include "db/db_impl/db_impl.h" #include "file/sst_file_manager_impl.h" namespace rocksdb { diff --git a/db/experimental.cc b/db/experimental.cc index d509a37bf2..0c3c3335d9 100644 --- a/db/experimental.cc +++ b/db/experimental.cc @@ -5,7 +5,7 @@ #include "rocksdb/experimental.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" namespace rocksdb { namespace experimental { diff --git a/db/fault_injection_test.cc b/db/fault_injection_test.cc index 00619d447d..e6ce1fa836 100644 --- a/db/fault_injection_test.cc +++ b/db/fault_injection_test.cc @@ -11,9 +11,9 @@ // the last "sync". It then checks for data loss errors by purposely dropping // file data (or entire files) not protected by a "sync". -#include "db/db_impl.h" #include "db/log_format.h" #include "db/version_set.h" +#include "db/db_impl/db_impl.h" #include "env/mock_env.h" #include "file/filename.h" #include "rocksdb/cache.h" diff --git a/db/forward_iterator.cc b/db/forward_iterator.cc index 9e0823366d..2633a3ff9b 100644 --- a/db/forward_iterator.cc +++ b/db/forward_iterator.cc @@ -11,7 +11,7 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/db_iter.h" #include "db/dbformat.h" #include "db/job_context.h" diff --git a/db/in_memory_stats_history.cc b/db/in_memory_stats_history.cc index e9e0cc7495..41fdb71c8c 100644 --- a/db/in_memory_stats_history.cc +++ b/db/in_memory_stats_history.cc @@ -6,8 +6,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include "db/db_impl.h" #include "db/in_memory_stats_history.h" +#include "db/db_impl/db_impl.h" namespace rocksdb { diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 58332f30fa..21dde297ab 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -22,7 +22,7 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "table/block_based/block_based_table_factory.h" #include "util/string_util.h" diff --git a/db/listener_test.cc b/db/listener_test.cc index 81a0fa1767..6fabf197f2 100644 --- a/db/listener_test.cc +++ b/db/listener_test.cc @@ -3,11 +3,11 @@ // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). -#include "db/db_impl.h" #include "db/db_test_util.h" #include "db/dbformat.h" #include "db/version_set.h" #include "db/write_batch_internal.h" +#include "db/db_impl/db_impl.h" #include "file/filename.h" #include "memtable/hash_linklist_rep.h" #include "monitoring/statistics.h" diff --git a/db/memtable_list.cc b/db/memtable_list.cc index 2b4ac6b84d..ca5283139a 100644 --- a/db/memtable_list.cc +++ b/db/memtable_list.cc @@ -13,7 +13,7 @@ #include #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/memtable.h" #include "db/range_tombstone_fragmenter.h" #include "db/version_set.h" diff --git a/db/merge_test.cc b/db/merge_test.cc index 13c35d2c01..1b62b5c2c5 100644 --- a/db/merge_test.cc +++ b/db/merge_test.cc @@ -7,8 +7,8 @@ #include #include -#include "db/db_impl.h" #include "db/dbformat.h" +#include "db/db_impl/db_impl.h" #include "db/write_batch_internal.h" #include "port/stack_trace.h" #include "rocksdb/cache.h" @@ -18,6 +18,9 @@ #include "rocksdb/merge_operator.h" #include "rocksdb/utilities/db_ttl.h" #include "test_util/testharness.h" +#include "db/dbformat.h" +#include "db/write_batch_internal.h" +#include "db/db_impl/db_impl.h" #include "utilities/merge_operators.h" namespace rocksdb { diff --git a/db/obsolete_files_test.cc b/db/obsolete_files_test.cc index 655c659b44..3a78869c95 100644 --- a/db/obsolete_files_test.cc +++ b/db/obsolete_files_test.cc @@ -13,7 +13,7 @@ #include #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/version_set.h" #include "db/write_batch_internal.h" #include "file/filename.h" diff --git a/db/options_file_test.cc b/db/options_file_test.cc index c7eba52c29..b86ecefa97 100644 --- a/db/options_file_test.cc +++ b/db/options_file_test.cc @@ -6,7 +6,7 @@ #ifndef ROCKSDB_LITE #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/db_test_util.h" #include "rocksdb/options.h" #include "rocksdb/table.h" diff --git a/db/plain_table_db_test.cc b/db/plain_table_db_test.cc index a73dd3cb43..d2d0426e65 100644 --- a/db/plain_table_db_test.cc +++ b/db/plain_table_db_test.cc @@ -12,7 +12,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/version_set.h" #include "db/write_batch_internal.h" #include "file/filename.h" diff --git a/db/prefix_test.cc b/db/prefix_test.cc index 3f2e794a6c..19f02f1099 100644 --- a/db/prefix_test.cc +++ b/db/prefix_test.cc @@ -17,7 +17,7 @@ int main() { #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "monitoring/histogram.h" #include "rocksdb/comparator.h" #include "rocksdb/db.h" diff --git a/db/range_del_aggregator.cc b/db/range_del_aggregator.cc index 8f86528ecb..7c188aeaa0 100644 --- a/db/range_del_aggregator.cc +++ b/db/range_del_aggregator.cc @@ -5,7 +5,7 @@ #include "db/range_del_aggregator.h" -#include "db/compaction_iteration_stats.h" +#include "db/compaction/compaction_iteration_stats.h" #include "db/dbformat.h" #include "db/pinned_iterators_manager.h" #include "db/range_del_aggregator.h" diff --git a/db/range_del_aggregator.h b/db/range_del_aggregator.h index ce7897a975..96cfb58130 100644 --- a/db/range_del_aggregator.h +++ b/db/range_del_aggregator.h @@ -13,7 +13,7 @@ #include #include -#include "db/compaction_iteration_stats.h" +#include "db/compaction/compaction_iteration_stats.h" #include "db/dbformat.h" #include "db/pinned_iterators_manager.h" #include "db/range_del_aggregator.h" diff --git a/db/repair.cc b/db/repair.cc index 577c122bcf..400e754ba4 100644 --- a/db/repair.cc +++ b/db/repair.cc @@ -66,7 +66,7 @@ #include #include "db/builder.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/dbformat.h" #include "db/log_reader.h" #include "db/log_writer.h" diff --git a/db/repair_test.cc b/db/repair_test.cc index 1851cde0df..21907e4357 100644 --- a/db/repair_test.cc +++ b/db/repair_test.cc @@ -9,7 +9,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/db_test_util.h" #include "file/file_util.h" #include "rocksdb/comparator.h" diff --git a/db/table_properties_collector_test.cc b/db/table_properties_collector_test.cc index e818f46142..a9895bbedb 100644 --- a/db/table_properties_collector_test.cc +++ b/db/table_properties_collector_test.cc @@ -9,10 +9,10 @@ #include #include -#include "db/db_impl.h" #include "db/dbformat.h" #include "db/table_properties_collector.h" +#include "db/db_impl/db_impl.h" #include "options/cf_options.h" #include "rocksdb/table.h" #include "table/block_based/block_based_table_factory.h" diff --git a/db/version_set.cc b/db/version_set.cc index 5d0529d270..26465a01a4 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -23,7 +23,7 @@ #include #include #include -#include "db/compaction.h" +#include "compaction/compaction.h" #include "db/internal_stats.h" #include "db/log_reader.h" #include "db/log_writer.h" diff --git a/db/version_set.h b/db/version_set.h index 776e08e448..c43e409144 100644 --- a/db/version_set.h +++ b/db/version_set.h @@ -29,8 +29,8 @@ #include #include "db/column_family.h" -#include "db/compaction.h" -#include "db/compaction_picker.h" +#include "db/compaction/compaction.h" +#include "db/compaction/compaction_picker.h" #include "db/dbformat.h" #include "db/file_indexer.h" #include "db/log_reader.h" diff --git a/db/wal_manager_test.cc b/db/wal_manager_test.cc index c0c47b0c34..3657fb691b 100644 --- a/db/wal_manager_test.cc +++ b/db/wal_manager_test.cc @@ -13,7 +13,7 @@ #include "rocksdb/write_buffer_manager.h" #include "db/column_family.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/log_writer.h" #include "db/version_set.h" #include "db/wal_manager.h" diff --git a/db/write_batch.cc b/db/write_batch.cc index 830fbeab15..1459e5a3aa 100644 --- a/db/write_batch.cc +++ b/db/write_batch.cc @@ -42,13 +42,13 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" #include "db/dbformat.h" #include "db/flush_scheduler.h" #include "db/memtable.h" #include "db/merge_context.h" #include "db/snapshot_impl.h" #include "db/write_batch_internal.h" +#include "db/db_impl/db_impl.h" #include "monitoring/perf_context_imp.h" #include "monitoring/statistics.h" #include "rocksdb/merge_operator.h" diff --git a/db/write_callback_test.cc b/db/write_callback_test.cc index aa3d077c40..b5e26a8a7f 100644 --- a/db/write_callback_test.cc +++ b/db/write_callback_test.cc @@ -11,7 +11,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/write_callback.h" #include "port/port.h" #include "rocksdb/db.h" diff --git a/file/sst_file_manager_impl.cc b/file/sst_file_manager_impl.cc index d63170452c..efd9e30e6a 100644 --- a/file/sst_file_manager_impl.cc +++ b/file/sst_file_manager_impl.cc @@ -12,7 +12,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "port/port.h" #include "rocksdb/env.h" #include "rocksdb/sst_file_manager.h" diff --git a/file/sst_file_manager_impl.h b/file/sst_file_manager_impl.h index b506ece279..8930422780 100644 --- a/file/sst_file_manager_impl.h +++ b/file/sst_file_manager_impl.h @@ -11,7 +11,7 @@ #include "port/port.h" -#include "db/compaction.h" +#include "db/compaction/compaction.h" #include "db/error_handler.h" #include "file/delete_scheduler.h" #include "rocksdb/sst_file_manager.h" diff --git a/src.mk b/src.mk index 44013bc2e1..5021acb96a 100644 --- a/src.mk +++ b/src.mk @@ -7,24 +7,24 @@ LIB_SOURCES = \ db/c.cc \ db/column_family.cc \ db/compacted_db_impl.cc \ - db/compaction.cc \ - db/compaction_iterator.cc \ - db/compaction_job.cc \ - db/compaction_picker.cc \ - db/compaction_picker_fifo.cc \ - db/compaction_picker_level.cc \ - db/compaction_picker_universal.cc \ + db/compaction/compaction.cc \ + db/compaction/compaction_iterator.cc \ + db/compaction/compaction_job.cc \ + db/compaction/compaction_picker.cc \ + db/compaction/compaction_picker_fifo.cc \ + db/compaction/compaction_picker_level.cc \ + db/compaction/compaction_picker_universal.cc \ db/convenience.cc \ db/db_filesnapshot.cc \ - db/db_impl.cc \ - db/db_impl_compaction_flush.cc \ - db/db_impl_debug.cc \ - db/db_impl_experimental.cc \ - db/db_impl_files.cc \ - db/db_impl_open.cc \ - db/db_impl_readonly.cc \ - db/db_impl_secondary.cc \ - db/db_impl_write.cc \ + db/db_impl/db_impl.cc \ + db/db_impl/db_impl_compaction_flush.cc \ + db/db_impl/db_impl_debug.cc \ + db/db_impl/db_impl_experimental.cc \ + db/db_impl/db_impl_files.cc \ + db/db_impl/db_impl_open.cc \ + db/db_impl/db_impl_readonly.cc \ + db/db_impl/db_impl_secondary.cc \ + db/db_impl/db_impl_write.cc \ db/db_info_dumper.cc \ db/db_iter.cc \ db/dbformat.cc \ @@ -259,10 +259,10 @@ MAIN_SOURCES = \ cache/cache_test.cc \ db/column_family_test.cc \ db/compact_files_test.cc \ - db/compaction_iterator_test.cc \ - db/compaction_job_stats_test.cc \ - db/compaction_job_test.cc \ - db/compaction_picker_test.cc \ + db/compaction/compaction_iterator_test.cc \ + db/compaction/compaction_job_test.cc \ + db/compaction/compaction_job_stats_test.cc \ + db/compaction/compaction_picker_test.cc \ db/comparator_db_test.cc \ db/corruption_test.cc \ db/cuckoo_table_db_test.cc \ @@ -286,7 +286,7 @@ MAIN_SOURCES = \ db/db_options_test.cc \ db/db_properties_test.cc \ db/db_range_del_test.cc \ - db/db_secondary_test.cc \ + db/db_impl/db_secondary_test.cc \ db/db_sst_test.cc \ db/db_statistics_test.cc \ db/db_table_properties_test.cc \ diff --git a/table/table_reader_bench.cc b/table/table_reader_bench.cc index 822c2294bb..2ec7b2d0fb 100644 --- a/table/table_reader_bench.cc +++ b/table/table_reader_bench.cc @@ -11,7 +11,7 @@ int main() { } #else -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/dbformat.h" #include "monitoring/histogram.h" #include "rocksdb/db.h" diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index d80502f16f..c6f19bed58 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -33,7 +33,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/malloc_stats.h" #include "db/version_set.h" #include "hdfs/env_hdfs.h" diff --git a/tools/db_stress.cc b/tools/db_stress.cc index c112cb348f..0c828deb16 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -44,7 +44,7 @@ int main() { #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/version_set.h" #include "hdfs/env_hdfs.h" #include "monitoring/histogram.h" diff --git a/tools/ldb_cmd.cc b/tools/ldb_cmd.cc index 10e9a495d2..d6f9b41570 100644 --- a/tools/ldb_cmd.cc +++ b/tools/ldb_cmd.cc @@ -1,3 +1,4 @@ + // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License @@ -12,7 +13,7 @@ #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/dbformat.h" #include "db/log_reader.h" #include "db/write_batch_internal.h" diff --git a/tools/reduce_levels_test.cc b/tools/reduce_levels_test.cc index 3aa0e3cf36..8b23dbf369 100644 --- a/tools/reduce_levels_test.cc +++ b/tools/reduce_levels_test.cc @@ -6,7 +6,7 @@ #ifndef ROCKSDB_LITE -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/version_set.h" #include "rocksdb/db.h" #include "rocksdb/utilities/ldb_cmd.h" diff --git a/tools/trace_analyzer_tool.cc b/tools/trace_analyzer_tool.cc index 03057afbc7..93528c0060 100644 --- a/tools/trace_analyzer_tool.cc +++ b/tools/trace_analyzer_tool.cc @@ -27,7 +27,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/memtable.h" #include "db/write_batch_internal.h" #include "options/cf_options.h" diff --git a/util/trace_replay.cc b/util/trace_replay.cc index c90fef2eff..9e0e8c48cd 100644 --- a/util/trace_replay.cc +++ b/util/trace_replay.cc @@ -8,7 +8,8 @@ #include #include #include -#include "db/db_impl.h" + +#include "db/db_impl/db_impl.h" #include "rocksdb/slice.h" #include "rocksdb/write_batch.h" #include "util/coding.h" diff --git a/utilities/backupable/backupable_db_test.cc b/utilities/backupable/backupable_db_test.cc index 05006d6a3e..37d9e4cd18 100644 --- a/utilities/backupable/backupable_db_test.cc +++ b/utilities/backupable/backupable_db_test.cc @@ -12,7 +12,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "env/env_chroot.h" #include "file/filename.h" #include "port/port.h" diff --git a/utilities/blob_db/blob_db_impl.cc b/utilities/blob_db/blob_db_impl.cc index 04b7eb73e2..7f447a04ad 100644 --- a/utilities/blob_db/blob_db_impl.cc +++ b/utilities/blob_db/blob_db_impl.cc @@ -11,7 +11,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/write_batch_internal.h" #include "file/file_util.h" #include "file/filename.h" diff --git a/utilities/blob_db/blob_file.cc b/utilities/blob_db/blob_file.cc index e14307d44c..4475772d8d 100644 --- a/utilities/blob_db/blob_file.cc +++ b/utilities/blob_db/blob_file.cc @@ -1,3 +1,4 @@ + // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License @@ -17,7 +18,7 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/dbformat.h" #include "file/filename.h" #include "util/logging.h" diff --git a/utilities/cassandra/cassandra_functional_test.cc b/utilities/cassandra/cassandra_functional_test.cc index 431ef69792..cec9ce7d88 100644 --- a/utilities/cassandra/cassandra_functional_test.cc +++ b/utilities/cassandra/cassandra_functional_test.cc @@ -4,7 +4,7 @@ // (found in the LICENSE.Apache file in the root directory). #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/merge_operator.h" #include "rocksdb/utilities/db_ttl.h" diff --git a/utilities/checkpoint/checkpoint_test.cc b/utilities/checkpoint/checkpoint_test.cc index da2972affd..d7d2548af3 100644 --- a/utilities/checkpoint/checkpoint_test.cc +++ b/utilities/checkpoint/checkpoint_test.cc @@ -16,7 +16,7 @@ #include #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "port/port.h" #include "port/stack_trace.h" #include "rocksdb/db.h" diff --git a/utilities/debug.cc b/utilities/debug.cc index 72fcbf0f54..8ddf64b5dc 100644 --- a/utilities/debug.cc +++ b/utilities/debug.cc @@ -7,7 +7,7 @@ #include "rocksdb/utilities/debug.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" namespace rocksdb { diff --git a/utilities/memory/memory_test.cc b/utilities/memory/memory_test.cc index 29903d460f..75fb9cd3f9 100644 --- a/utilities/memory/memory_test.cc +++ b/utilities/memory/memory_test.cc @@ -5,7 +5,7 @@ #ifndef ROCKSDB_LITE -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/cache.h" #include "rocksdb/table.h" #include "rocksdb/utilities/memory_util.h" diff --git a/utilities/memory/memory_util.cc b/utilities/memory/memory_util.cc index 83bf33c179..47ca4b7bb7 100644 --- a/utilities/memory/memory_util.cc +++ b/utilities/memory/memory_util.cc @@ -7,7 +7,7 @@ #include "rocksdb/utilities/memory_util.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" namespace rocksdb { diff --git a/utilities/transactions/optimistic_transaction.cc b/utilities/transactions/optimistic_transaction.cc index 48c9180ae9..e8cf6eade4 100644 --- a/utilities/transactions/optimistic_transaction.cc +++ b/utilities/transactions/optimistic_transaction.cc @@ -10,7 +10,7 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/comparator.h" #include "rocksdb/db.h" #include "rocksdb/status.h" diff --git a/utilities/transactions/optimistic_transaction_db_impl.cc b/utilities/transactions/optimistic_transaction_db_impl.cc index d9db6fde07..b7fedc0661 100644 --- a/utilities/transactions/optimistic_transaction_db_impl.cc +++ b/utilities/transactions/optimistic_transaction_db_impl.cc @@ -10,7 +10,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/options.h" #include "rocksdb/utilities/optimistic_transaction_db.h" diff --git a/utilities/transactions/pessimistic_transaction.cc b/utilities/transactions/pessimistic_transaction.cc index 93d75a8357..ed7444894c 100644 --- a/utilities/transactions/pessimistic_transaction.cc +++ b/utilities/transactions/pessimistic_transaction.cc @@ -13,7 +13,7 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/comparator.h" #include "rocksdb/db.h" #include "rocksdb/snapshot.h" diff --git a/utilities/transactions/pessimistic_transaction_db.cc b/utilities/transactions/pessimistic_transaction_db.cc index 8920f85fb7..e906b444ff 100644 --- a/utilities/transactions/pessimistic_transaction_db.cc +++ b/utilities/transactions/pessimistic_transaction_db.cc @@ -16,7 +16,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/options.h" #include "rocksdb/utilities/transaction_db.h" diff --git a/utilities/transactions/transaction_base.cc b/utilities/transactions/transaction_base.cc index 68b87b5aa4..d4923a88f4 100644 --- a/utilities/transactions/transaction_base.cc +++ b/utilities/transactions/transaction_base.cc @@ -13,7 +13,7 @@ #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/column_family.h" #include "rocksdb/comparator.h" #include "rocksdb/db.h" diff --git a/utilities/transactions/transaction_test.cc b/utilities/transactions/transaction_test.cc index 0750b249bb..6c9f4bccd6 100644 --- a/utilities/transactions/transaction_test.cc +++ b/utilities/transactions/transaction_test.cc @@ -16,7 +16,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/options.h" #include "rocksdb/perf_context.h" diff --git a/utilities/transactions/transaction_test.h b/utilities/transactions/transaction_test.h index 22dc208f52..da2a08d3c5 100644 --- a/utilities/transactions/transaction_test.h +++ b/utilities/transactions/transaction_test.h @@ -15,7 +15,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/options.h" #include "rocksdb/utilities/transaction.h" diff --git a/utilities/transactions/transaction_util.cc b/utilities/transactions/transaction_util.cc index ec6f7e60ae..c582b73aa3 100644 --- a/utilities/transactions/transaction_util.cc +++ b/utilities/transactions/transaction_util.cc @@ -15,7 +15,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/status.h" #include "rocksdb/utilities/write_batch_with_index.h" #include "util/string_util.h" diff --git a/utilities/transactions/write_prepared_transaction_test.cc b/utilities/transactions/write_prepared_transaction_test.cc index c0a7e27805..8b52b1ae66 100644 --- a/utilities/transactions/write_prepared_transaction_test.cc +++ b/utilities/transactions/write_prepared_transaction_test.cc @@ -18,7 +18,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/dbformat.h" #include "rocksdb/db.h" #include "rocksdb/options.h" diff --git a/utilities/transactions/write_prepared_txn.cc b/utilities/transactions/write_prepared_txn.cc index 6c7cb359dc..05650e2b3f 100644 --- a/utilities/transactions/write_prepared_txn.cc +++ b/utilities/transactions/write_prepared_txn.cc @@ -16,7 +16,7 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/status.h" #include "rocksdb/utilities/transaction_db.h" diff --git a/utilities/transactions/write_prepared_txn_db.cc b/utilities/transactions/write_prepared_txn_db.cc index b4a71f5ea6..bf94d83d82 100644 --- a/utilities/transactions/write_prepared_txn_db.cc +++ b/utilities/transactions/write_prepared_txn_db.cc @@ -17,7 +17,7 @@ #include #include -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "rocksdb/db.h" #include "rocksdb/options.h" #include "rocksdb/utilities/transaction_db.h" diff --git a/utilities/transactions/write_unprepared_txn.cc b/utilities/transactions/write_unprepared_txn.cc index 823b12ea17..efd766514c 100644 --- a/utilities/transactions/write_unprepared_txn.cc +++ b/utilities/transactions/write_unprepared_txn.cc @@ -6,7 +6,7 @@ #ifndef ROCKSDB_LITE #include "utilities/transactions/write_unprepared_txn.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "util/cast_util.h" #include "utilities/transactions/write_unprepared_txn_db.h" diff --git a/utilities/ttl/db_ttl_impl.h b/utilities/ttl/db_ttl_impl.h index 8bf064a046..69e991ed85 100644 --- a/utilities/ttl/db_ttl_impl.h +++ b/utilities/ttl/db_ttl_impl.h @@ -16,7 +16,7 @@ #include "rocksdb/merge_operator.h" #include "rocksdb/utilities/utility_db.h" #include "rocksdb/utilities/db_ttl.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #ifdef _WIN32 // Windows API macro interference diff --git a/utilities/write_batch_with_index/write_batch_with_index.cc b/utilities/write_batch_with_index/write_batch_with_index.cc index 0f8f6c1d62..cf17abf22e 100644 --- a/utilities/write_batch_with_index/write_batch_with_index.cc +++ b/utilities/write_batch_with_index/write_batch_with_index.cc @@ -10,7 +10,7 @@ #include #include "db/column_family.h" -#include "db/db_impl.h" +#include "db/db_impl/db_impl.h" #include "db/merge_context.h" #include "db/merge_helper.h" #include "memory/arena.h"