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 9a4d9deb1..4c2fa7119 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 244b929c4..5181154a2 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 dc39f87bc..edddc7b99 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 86aac02ab..67d764ad1 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 fde1996ae..ce22a00aa 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 21b3321be..9374a1358 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 438fdb7c9..92975da87 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 acdaad4ec..88928391a 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 5c574b4b9..8c1a1428c 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 089dd6684..5dc7e83c8 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 7e0609699..135018f51 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 6ab43b1be..9744ab8df 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 99bb026b5..ddda79a4c 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 92a6fab8d..3866d70ee 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 0751727d7..1387fffb1 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 35c1100f9..91310e9f1 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 93e55b7a0..838cda5ea 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 bfe13828b..4276ea9cb 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 437c8d304..53477014c 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 eadb31f9e..ffb5a9f64 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 9da107c5d..a4e63803c 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 70fe46c5b..aeb368ea2 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 1d37fe50e..9fc196698 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 c3e9e450f..bab93227a 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 20edd3074..465245715 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 375e5998e..2c44735d9 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 71c237f60..c11653fb1 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 53c4d42d2..9e83c9080 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 6f60e2d70..135a34c2e 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 59757aeb9..ac544793e 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 5534c225f..196e38f14 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 4c418d6f3..27d39f90d 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 c6025a8cc..881fa26af 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 f55897119..4b558facb 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 47a880199..a8fed40be 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 64c6dc968..608c8ce49 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 5dae140c7..5019221b5 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 5d7515c28..552492284 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 23816210d..18df900cb 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 a8ea921a2..a976a5750 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 a57835432..24cfd33c1 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 98463f7b2..02e23e269 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 23132434f..c9184281c 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 85b546c54..9a6df9610 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 b899ba18b..36ecf3a1b 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 debb2ba60..4c4bd382c 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 2af202fad..4e9fcafad 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 280d269f1..18014e5b4 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 140fb4850..1d818f489 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 d509a37bf..0c3c3335d 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 00619d447..e6ce1fa83 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 9e0823366..2633a3ff9 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 e9e0cc749..41fdb71c8 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 58332f30f..21dde297a 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 81a0fa176..6fabf197f 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 2b4ac6b84..ca5283139 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 13c35d2c0..1b62b5c2c 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 655c659b4..3a78869c9 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 c7eba52c2..b86ecefa9 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 a73dd3cb4..d2d0426e6 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 3f2e794a6..19f02f109 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 8f86528ec..7c188aeaa 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 ce7897a97..96cfb5813 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 577c122bc..400e754ba 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 1851cde0d..21907e435 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 e818f4614..a9895bbed 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 5d0529d27..26465a01a 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 776e08e44..c43e40914 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 c0c47b0c3..3657fb691 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 830fbeab1..1459e5a3a 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 aa3d077c4..b5e26a8a7 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 d63170452..efd9e30e6 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 b506ece27..893042278 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 44013bc2e..5021acb96 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 822c2294b..2ec7b2d0f 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 d80502f16..c6f19bed5 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 c112cb348..0c828deb1 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 10e9a495d..d6f9b4157 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 3aa0e3cf3..8b23dbf36 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 03057afbc..93528c006 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 c90fef2ef..9e0e8c48c 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 05006d6a3..37d9e4cd1 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 04b7eb73e..7f447a04a 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 e14307d44..4475772d8 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 431ef6979..cec9ce7d8 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 da2972aff..d7d2548af 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 72fcbf0f5..8ddf64b5d 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 29903d460..75fb9cd3f 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 83bf33c17..47ca4b7bb 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 48c9180ae..e8cf6eade 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 d9db6fde0..b7fedc066 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 93d75a835..ed7444894 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 8920f85fb..e906b444f 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 68b87b5aa..d4923a88f 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 0750b249b..6c9f4bccd 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 22dc208f5..da2a08d3c 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 ec6f7e60a..c582b73aa 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 c0a7e2780..8b52b1ae6 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 6c7cb359d..05650e2b3 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 b4a71f5ea..bf94d83d8 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 823b12ea1..efd766514 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 8bf064a04..69e991ed8 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 0f8f6c1d6..cf17abf22 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"