Cleanup includes in dbformat.h (#8930)

Summary:
This header file was including everything and the kitchen sink when it did not need to.  This resulted in many places including this header when they needed other pieces instead.

Cleaned up this header to only include what was needed and fixed up the remaining code to include what was now missing.

Hopefully, this sort of code hygiene cleanup will speed up the builds...

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

Reviewed By: pdillinger

Differential Revision: D31142788

Pulled By: mrambacher

fbshipit-source-id: 6b45de3f300750c79f751f6227dece9cfd44085d
This commit is contained in:
mrambacher 2021-09-29 04:01:57 -07:00 committed by Facebook GitHub Bot
parent 559943cdc0
commit 13ae16c315
88 changed files with 109 additions and 44 deletions

View File

@ -12,7 +12,6 @@
#include <string> #include <string>
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/db_iter.h" #include "db/db_iter.h"
#include "db/dbformat.h"
#include "db/range_del_aggregator.h" #include "db/range_del_aggregator.h"
#include "memory/arena.h" #include "memory/arena.h"
#include "options/cf_options.h" #include "options/cf_options.h"

View File

@ -15,7 +15,6 @@
#include "db/blob/blob_file_builder.h" #include "db/blob/blob_file_builder.h"
#include "db/compaction/compaction_iterator.h" #include "db/compaction/compaction_iterator.h"
#include "db/dbformat.h"
#include "db/event_helpers.h" #include "db/event_helpers.h"
#include "db/internal_stats.h" #include "db/internal_stats.h"
#include "db/merge_helper.h" #include "db/merge_helper.h"

View File

@ -29,6 +29,7 @@
#include "db/version_set.h" #include "db/version_set.h"
#include "db/write_controller.h" #include "db/write_controller.h"
#include "file/sst_file_manager_impl.h" #include "file/sst_file_manager_impl.h"
#include "logging/logging.h"
#include "monitoring/thread_status_util.h" #include "monitoring/thread_status_util.h"
#include "options/options_helper.h" #include "options/options_helper.h"
#include "port/port.h" #include "port/port.h"

View File

@ -11,6 +11,7 @@
#include "db/blob/blob_file_builder.h" #include "db/blob/blob_file_builder.h"
#include "db/blob/blob_index.h" #include "db/blob/blob_index.h"
#include "db/snapshot_checker.h" #include "db/snapshot_checker.h"
#include "logging/logging.h"
#include "port/likely.h" #include "port/likely.h"
#include "rocksdb/listener.h" #include "rocksdb/listener.h"
#include "table/internal_iterator.h" #include "table/internal_iterator.h"

View File

@ -20,7 +20,6 @@
#include "db/blob/blob_file_completion_callback.h" #include "db/blob/blob_file_completion_callback.h"
#include "db/column_family.h" #include "db/column_family.h"
#include "db/compaction/compaction_iterator.h" #include "db/compaction/compaction_iterator.h"
#include "db/dbformat.h"
#include "db/flush_scheduler.h" #include "db/flush_scheduler.h"
#include "db/internal_stats.h" #include "db/internal_stats.h"
#include "db/job_context.h" #include "db/job_context.h"

View File

@ -15,9 +15,11 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "db/column_family.h" #include "db/column_family.h"
#include "file/filename.h" #include "file/filename.h"
#include "logging/log_buffer.h" #include "logging/log_buffer.h"
#include "logging/logging.h"
#include "monitoring/statistics.h" #include "monitoring/statistics.h"
#include "test_util/sync_point.h" #include "test_util/sync_point.h"
#include "util/random.h" #include "util/random.h"

View File

@ -13,8 +13,10 @@
#include <cinttypes> #include <cinttypes>
#include <string> #include <string>
#include <vector> #include <vector>
#include "db/column_family.h" #include "db/column_family.h"
#include "logging/log_buffer.h" #include "logging/log_buffer.h"
#include "logging/logging.h"
#include "util/string_util.h" #include "util/string_util.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {

View File

@ -15,9 +15,11 @@
#include <queue> #include <queue>
#include <string> #include <string>
#include <utility> #include <utility>
#include "db/column_family.h" #include "db/column_family.h"
#include "file/filename.h" #include "file/filename.h"
#include "logging/log_buffer.h" #include "logging/log_buffer.h"
#include "logging/logging.h"
#include "monitoring/statistics.h" #include "monitoring/statistics.h"
#include "test_util/sync_point.h" #include "test_util/sync_point.h"
#include "util/random.h" #include "util/random.h"

View File

@ -7,14 +7,17 @@
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
#include <stdint.h> #include <stdint.h>
#include <algorithm> #include <algorithm>
#include <cinttypes> #include <cinttypes>
#include <string> #include <string>
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/job_context.h" #include "db/job_context.h"
#include "db/version_set.h" #include "db/version_set.h"
#include "file/file_util.h" #include "file/file_util.h"
#include "file/filename.h" #include "file/filename.h"
#include "logging/logging.h"
#include "port/port.h" #include "port/port.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"

View File

@ -8,6 +8,7 @@
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/version_set.h" #include "db/version_set.h"
#include "logging/logging.h"
#include "table/get_context.h" #include "table/get_context.h"
#include "util/cast_util.h" #include "util/cast_util.h"

View File

@ -22,7 +22,6 @@
#include "db/column_family.h" #include "db/column_family.h"
#include "db/compaction/compaction_iterator.h" #include "db/compaction/compaction_iterator.h"
#include "db/compaction/compaction_job.h" #include "db/compaction/compaction_job.h"
#include "db/dbformat.h"
#include "db/error_handler.h" #include "db/error_handler.h"
#include "db/event_helpers.h" #include "db/event_helpers.h"
#include "db/external_sst_file_ingestion_job.h" #include "db/external_sst_file_ingestion_job.h"

View File

@ -14,6 +14,7 @@
#include "db/error_handler.h" #include "db/error_handler.h"
#include "db/event_helpers.h" #include "db/event_helpers.h"
#include "file/sst_file_manager_impl.h" #include "file/sst_file_manager_impl.h"
#include "logging/logging.h"
#include "monitoring/iostats_context_imp.h" #include "monitoring/iostats_context_imp.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "monitoring/thread_status_updater.h" #include "monitoring/thread_status_updater.h"

View File

@ -14,6 +14,7 @@
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/job_context.h" #include "db/job_context.h"
#include "db/version_set.h" #include "db/version_set.h"
#include "logging/logging.h"
#include "rocksdb/status.h" #include "rocksdb/status.h"
#include "util/cast_util.h" #include "util/cast_util.h"

View File

@ -16,6 +16,7 @@
#include "file/file_util.h" #include "file/file_util.h"
#include "file/filename.h" #include "file/filename.h"
#include "file/sst_file_manager_impl.h" #include "file/sst_file_manager_impl.h"
#include "logging/logging.h"
#include "port/port.h" #include "port/port.h"
#include "util/autovector.h" #include "util/autovector.h"

View File

@ -16,6 +16,7 @@
#include "file/read_write_util.h" #include "file/read_write_util.h"
#include "file/sst_file_manager_impl.h" #include "file/sst_file_manager_impl.h"
#include "file/writable_file_writer.h" #include "file/writable_file_writer.h"
#include "logging/logging.h"
#include "monitoring/persistent_stats_history.h" #include "monitoring/persistent_stats_history.h"
#include "options/options_helper.h" #include "options/options_helper.h"
#include "rocksdb/table.h" #include "rocksdb/table.h"

View File

@ -10,6 +10,7 @@
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/db_iter.h" #include "db/db_iter.h"
#include "db/merge_context.h" #include "db/merge_context.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "util/cast_util.h" #include "util/cast_util.h"

View File

@ -10,6 +10,7 @@
#include "db/arena_wrapped_db_iter.h" #include "db/arena_wrapped_db_iter.h"
#include "db/merge_context.h" #include "db/merge_context.h"
#include "logging/auto_roll_logger.h" #include "logging/auto_roll_logger.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "rocksdb/configurable.h" #include "rocksdb/configurable.h"
#include "util/cast_util.h" #include "util/cast_util.h"

View File

@ -9,7 +9,9 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "logging/logging.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {

View File

@ -11,6 +11,7 @@
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/error_handler.h" #include "db/error_handler.h"
#include "db/event_helpers.h" #include "db/event_helpers.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "options/options_helper.h" #include "options/options_helper.h"
#include "test_util/sync_point.h" #include "test_util/sync_point.h"

View File

@ -12,7 +12,6 @@
#include <string> #include <string>
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/dbformat.h"
#include "db/range_del_aggregator.h" #include "db/range_del_aggregator.h"
#include "memory/arena.h" #include "memory/arena.h"
#include "options/cf_options.h" #include "options/cf_options.h"

View File

@ -22,7 +22,6 @@
#include <vector> #include <vector>
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/dbformat.h"
#include "file/filename.h" #include "file/filename.h"
#include "rocksdb/cache.h" #include "rocksdb/cache.h"
#include "rocksdb/compaction_filter.h" #include "rocksdb/compaction_filter.h"

View File

@ -9,7 +9,10 @@
#include "db/dbformat.h" #include "db/dbformat.h"
#include <stdio.h> #include <stdio.h>
#include <cinttypes> #include <cinttypes>
#include "db/lookup_key.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "port/port.h" #include "port/port.h"
#include "util/coding.h" #include "util/coding.h"

View File

@ -9,19 +9,14 @@
#pragma once #pragma once
#include <stdio.h> #include <stdio.h>
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility> #include <utility>
#include "db/lookup_key.h"
#include "db/merge_context.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h"
#include "rocksdb/comparator.h" #include "rocksdb/comparator.h"
#include "rocksdb/db.h"
#include "rocksdb/filter_policy.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h" #include "rocksdb/slice_transform.h"
#include "rocksdb/table.h"
#include "rocksdb/types.h" #include "rocksdb/types.h"
#include "util/coding.h" #include "util/coding.h"
#include "util/user_comparator_wrapper.h" #include "util/user_comparator_wrapper.h"

View File

@ -17,6 +17,7 @@
#include "db/version_edit.h" #include "db/version_edit.h"
#include "file/file_util.h" #include "file/file_util.h"
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "logging/logging.h"
#include "table/merging_iterator.h" #include "table/merging_iterator.h"
#include "table/scoped_arena_iterator.h" #include "table/scoped_arena_iterator.h"
#include "table/sst_file_writer_collectors.h" #include "table/sst_file_writer_collectors.h"

View File

@ -9,7 +9,6 @@
#include <vector> #include <vector>
#include "db/column_family.h" #include "db/column_family.h"
#include "db/dbformat.h"
#include "db/internal_stats.h" #include "db/internal_stats.h"
#include "db/snapshot_impl.h" #include "db/snapshot_impl.h"
#include "env/file_system_tracer.h" #include "env/file_system_tracer.h"

View File

@ -19,7 +19,6 @@
#include "db/blob/blob_file_completion_callback.h" #include "db/blob/blob_file_completion_callback.h"
#include "db/column_family.h" #include "db/column_family.h"
#include "db/dbformat.h"
#include "db/flush_scheduler.h" #include "db/flush_scheduler.h"
#include "db/internal_stats.h" #include "db/internal_stats.h"
#include "db/job_context.h" #include "db/job_context.h"

View File

@ -10,7 +10,6 @@
#include <vector> #include <vector>
#include <queue> #include <queue>
#include "db/dbformat.h"
#include "memory/arena.h" #include "memory/arena.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/iterator.h" #include "rocksdb/iterator.h"

View File

@ -10,6 +10,7 @@
#include "db/version_edit.h" #include "db/version_edit.h"
#include "file/file_util.h" #include "file/file_util.h"
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "logging/logging.h"
#include "table/merging_iterator.h" #include "table/merging_iterator.h"
#include "table/scoped_arena_iterator.h" #include "table/scoped_arena_iterator.h"
#include "table/sst_file_writer_collectors.h" #include "table/sst_file_writer_collectors.h"

View File

@ -4,7 +4,6 @@
#include <vector> #include <vector>
#include "db/column_family.h" #include "db/column_family.h"
#include "db/dbformat.h"
#include "db/external_sst_file_ingestion_job.h" #include "db/external_sst_file_ingestion_job.h"
#include "db/snapshot_impl.h" #include "db/snapshot_impl.h"
#include "options/db_options.h" #include "options/db_options.h"

View File

@ -10,7 +10,6 @@
#pragma once #pragma once
#include <string> #include <string>
#include <utility> #include <utility>
#include "rocksdb/db.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"
#include "rocksdb/types.h" #include "rocksdb/types.h"

View File

@ -21,6 +21,7 @@
#include "db/pinned_iterators_manager.h" #include "db/pinned_iterators_manager.h"
#include "db/range_tombstone_fragmenter.h" #include "db/range_tombstone_fragmenter.h"
#include "db/read_callback.h" #include "db/read_callback.h"
#include "logging/logging.h"
#include "memory/arena.h" #include "memory/arena.h"
#include "memory/memory_usage.h" #include "memory/memory_usage.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"

View File

@ -16,6 +16,7 @@
#include "db/range_tombstone_fragmenter.h" #include "db/range_tombstone_fragmenter.h"
#include "db/version_set.h" #include "db/version_set.h"
#include "logging/log_buffer.h" #include "logging/log_buffer.h"
#include "logging/logging.h"
#include "monitoring/thread_status_util.h" #include "monitoring/thread_status_util.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"

View File

@ -12,7 +12,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "db/dbformat.h"
#include "db/logs_with_prep_tracker.h" #include "db/logs_with_prep_tracker.h"
#include "db/memtable.h" #include "db/memtable.h"
#include "db/range_del_aggregator.h" #include "db/range_del_aggregator.h"

View File

@ -9,12 +9,12 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "db/dbformat.h"
#include "db/merge_context.h" #include "db/merge_context.h"
#include "db/range_del_aggregator.h" #include "db/range_del_aggregator.h"
#include "db/snapshot_checker.h" #include "db/snapshot_checker.h"
#include "rocksdb/compaction_filter.h" #include "rocksdb/compaction_filter.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/merge_operator.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"
#include "util/stop_watch.h" #include "util/stop_watch.h"
@ -26,6 +26,7 @@ class Logger;
class MergeOperator; class MergeOperator;
class Statistics; class Statistics;
class SystemClock; class SystemClock;
class Version;
class MergeHelper { class MergeHelper {
public: public:

View File

@ -5,6 +5,9 @@
// //
#include "db/output_validator.h" #include "db/output_validator.h"
#include "test_util/sync_point.h"
#include "util/hash.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
Status OutputValidator::Add(const Slice& key, const Slice& value) { Status OutputValidator::Add(const Slice& key, const Slice& value) {
if (enable_hash_) { if (enable_hash_) {

View File

@ -5,9 +5,8 @@
// //
#pragma once #pragma once
#include "db/dbformat.h" #include "db/dbformat.h"
#include "rocksdb/slice.h"
#include "rocksdb/status.h" #include "rocksdb/status.h"
#include "test_util/sync_point.h"
#include "util/hash.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
// A class that validates key/value that is inserted to an SST file. // A class that validates key/value that is inserted to an SST file.

View File

@ -62,6 +62,7 @@
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
#include <cinttypes> #include <cinttypes>
#include "db/builder.h" #include "db/builder.h"
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "db/dbformat.h" #include "db/dbformat.h"
@ -73,6 +74,7 @@
#include "db/write_batch_internal.h" #include "db/write_batch_internal.h"
#include "file/filename.h" #include "file/filename.h"
#include "file/writable_file_writer.h" #include "file/writable_file_writer.h"
#include "logging/logging.h"
#include "options/cf_options.h" #include "options/cf_options.h"
#include "rocksdb/comparator.h" #include "rocksdb/comparator.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"

View File

@ -10,6 +10,7 @@
#include "db/log_reader.h" #include "db/log_reader.h"
#include "db/version_set.h" #include "db/version_set.h"
#include "file/filename.h" #include "file/filename.h"
#include "logging/logging.h"
#include "options/db_options.h" #include "options/db_options.h"
#include "port/port.h" #include "port/port.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"

View File

@ -13,6 +13,7 @@
#include "db/blob/blob_file_cache.h" #include "db/blob/blob_file_cache.h"
#include "db/blob/blob_file_reader.h" #include "db/blob/blob_file_reader.h"
#include "logging/logging.h"
#include "monitoring/persistent_stats_history.h" #include "monitoring/persistent_stats_history.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {

View File

@ -40,6 +40,7 @@
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "file/read_write_util.h" #include "file/read_write_util.h"
#include "file/writable_file_writer.h" #include "file/writable_file_writer.h"
#include "logging/logging.h"
#include "monitoring/file_read_sample.h" #include "monitoring/file_read_sample.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "monitoring/persistent_stats_history.h" #include "monitoring/persistent_stats_history.h"

View File

@ -14,6 +14,7 @@
#include "db_stress_tool/db_stress_driver.h" #include "db_stress_tool/db_stress_driver.h"
#include "db_stress_tool/db_stress_table_properties_collector.h" #include "db_stress_tool/db_stress_table_properties_collector.h"
#include "rocksdb/convenience.h" #include "rocksdb/convenience.h"
#include "rocksdb/filter_policy.h"
#include "rocksdb/secondary_cache.h" #include "rocksdb/secondary_cache.h"
#include "rocksdb/sst_file_manager.h" #include "rocksdb/sst_file_manager.h"
#include "rocksdb/types.h" #include "rocksdb/types.h"

1
env/env_test.cc vendored
View File

@ -41,6 +41,7 @@
#include "env/env_encryption_ctr.h" #include "env/env_encryption_ctr.h"
#include "env/unique_id.h" #include "env/unique_id.h"
#include "logging/log_buffer.h" #include "logging/log_buffer.h"
#include "logging/logging.h"
#include "port/malloc.h" #include "port/malloc.h"
#include "port/port.h" #include "port/port.h"
#include "rocksdb/convenience.h" #include "rocksdb/convenience.h"

View File

@ -9,6 +9,7 @@
#include <vector> #include <vector>
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "logging/logging.h"
#include "port/port.h" #include "port/port.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/sst_file_manager.h" #include "rocksdb/sst_file_manager.h"

View File

@ -10,6 +10,7 @@
#include <limits> #include <limits>
#include <string> #include <string>
#include "logging/logging.h"
#include "options/configurable_helper.h" #include "options/configurable_helper.h"
#include "options/db_options.h" #include "options/db_options.h"
#include "options/options_helper.h" #include "options/options_helper.h"

View File

@ -12,6 +12,7 @@
#include <cinttypes> #include <cinttypes>
#include <limits> #include <limits>
#include "logging/logging.h"
#include "monitoring/statistics.h" #include "monitoring/statistics.h"
#include "options/db_options.h" #include "options/db_options.h"
#include "options/options_helper.h" #include "options/options_helper.h"
@ -19,6 +20,7 @@
#include "rocksdb/compaction_filter.h" #include "rocksdb/compaction_filter.h"
#include "rocksdb/comparator.h" #include "rocksdb/comparator.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/filter_policy.h"
#include "rocksdb/memtablerep.h" #include "rocksdb/memtablerep.h"
#include "rocksdb/merge_operator.h" #include "rocksdb/merge_operator.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"

View File

@ -13,7 +13,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "db/dbformat.h"
#include "db/pinned_iterators_manager.h" #include "db/pinned_iterators_manager.h"
#include "port/malloc.h" #include "port/malloc.h"
#include "rocksdb/iterator.h" #include "rocksdb/iterator.h"

View File

@ -25,6 +25,7 @@
#include "cache/cache_reservation_manager.h" #include "cache/cache_reservation_manager.h"
#include "db/dbformat.h" #include "db/dbformat.h"
#include "index_builder.h" #include "index_builder.h"
#include "logging/logging.h"
#include "memory/memory_allocator.h" #include "memory/memory_allocator.h"
#include "rocksdb/cache.h" #include "rocksdb/cache.h"
#include "rocksdb/comparator.h" #include "rocksdb/comparator.h"

View File

@ -15,10 +15,11 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "options/configurable_helper.h" #include "logging/logging.h"
#include "port/port.h" #include "port/port.h"
#include "rocksdb/cache.h" #include "rocksdb/cache.h"
#include "rocksdb/convenience.h" #include "rocksdb/convenience.h"
#include "rocksdb/filter_policy.h"
#include "rocksdb/flush_block_policy.h" #include "rocksdb/flush_block_policy.h"
#include "rocksdb/utilities/options_type.h" #include "rocksdb/utilities/options_type.h"
#include "table/block_based/block_based_table_builder.h" #include "table/block_based/block_based_table_builder.h"

View File

@ -13,15 +13,19 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "db/dbformat.h" #include "port/port.h"
#include "rocksdb/flush_block_policy.h" #include "rocksdb/flush_block_policy.h"
#include "rocksdb/table.h" #include "rocksdb/table.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
struct ColumnFamilyOptions;
struct ConfigOptions; struct ConfigOptions;
struct DBOptions;
struct EnvOptions; struct EnvOptions;
class BlockBasedTableBuilder; class BlockBasedTableBuilder;
class RandomAccessFileReader;
class WritableFileWriter;
// A class used to track actual bytes written from the tail in the recent SST // A class used to track actual bytes written from the tail in the recent SST
// file opens, and provide a suggestion for following open. // file opens, and provide a suggestion for following open.

View File

@ -22,6 +22,7 @@
#include "file/file_prefetch_buffer.h" #include "file/file_prefetch_buffer.h"
#include "file/file_util.h" #include "file/file_util.h"
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "port/lang.h" #include "port/lang.h"
#include "rocksdb/cache.h" #include "rocksdb/cache.h"
@ -32,6 +33,7 @@
#include "rocksdb/filter_policy.h" #include "rocksdb/filter_policy.h"
#include "rocksdb/iterator.h" #include "rocksdb/iterator.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "rocksdb/snapshot.h"
#include "rocksdb/statistics.h" #include "rocksdb/statistics.h"
#include "rocksdb/system_clock.h" #include "rocksdb/system_clock.h"
#include "rocksdb/table.h" #include "rocksdb/table.h"

View File

@ -13,6 +13,7 @@
#include "db/range_tombstone_fragmenter.h" #include "db/range_tombstone_fragmenter.h"
#include "file/filename.h" #include "file/filename.h"
#include "table/block_based/block.h"
#include "table/block_based/block_based_table_factory.h" #include "table/block_based/block_based_table_factory.h"
#include "table/block_based/block_type.h" #include "table/block_based/block_type.h"
#include "table/block_based/cachable_entry.h" #include "table/block_based/cachable_entry.h"

View File

@ -10,6 +10,7 @@
#include "options/options_helper.h" #include "options/options_helper.h"
#include "port/port.h" #include "port/port.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "rocksdb/db.h"
#include "rocksdb/file_system.h" #include "rocksdb/file_system.h"
#include "table/block_based/block_based_table_builder.h" #include "table/block_based/block_based_table_builder.h"
#include "table/block_based/block_based_table_factory.h" #include "table/block_based/block_based_table_factory.h"

View File

@ -20,10 +20,11 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include "db/dbformat.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h" #include "rocksdb/slice_transform.h"

View File

@ -13,6 +13,7 @@
#include <deque> #include <deque>
#include <limits> #include <limits>
#include "logging/logging.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"
#include "table/block_based/block_based_filter_block.h" #include "table/block_based/block_based_filter_block.h"
#include "table/block_based/filter_policy_internal.h" #include "table/block_based/filter_policy_internal.h"

View File

@ -7,11 +7,12 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include "db/dbformat.h" #include "rocksdb/filter_policy.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h" #include "rocksdb/slice_transform.h"

View File

@ -8,6 +8,7 @@
#include <utility> #include <utility>
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "port/malloc.h" #include "port/malloc.h"
#include "port/port.h" #include "port/port.h"

View File

@ -9,17 +9,17 @@
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include "db/dbformat.h"
#include "index_builder.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h" #include "rocksdb/slice_transform.h"
#include "table/block_based/block.h" #include "table/block_based/block.h"
#include "table/block_based/filter_block_reader_common.h" #include "table/block_based/filter_block_reader_common.h"
#include "table/block_based/full_filter_block.h" #include "table/block_based/full_filter_block.h"
#include "table/block_based/index_builder.h"
#include "util/autovector.h" #include "util/autovector.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
class InternalKeyComparator;
class PartitionedFilterBlockBuilder : public FullFilterBlockBuilder { class PartitionedFilterBlockBuilder : public FullFilterBlockBuilder {
public: public:

View File

@ -5,6 +5,8 @@
// //
#include "table/block_based/uncompression_dict_reader.h" #include "table/block_based/uncompression_dict_reader.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h" #include "monitoring/perf_context_imp.h"
#include "table/block_based/block_based_table_reader.h" #include "table/block_based/block_based_table_reader.h"
#include "util/compression.h" #include "util/compression.h"

View File

@ -10,6 +10,7 @@
#include "options/options_helper.h" #include "options/options_helper.h"
#include "port/port.h" #include "port/port.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "rocksdb/db.h"
#include "rocksdb/file_system.h" #include "rocksdb/file_system.h"
#include "table/block_based/binary_search_index_reader.h" #include "table/block_based/binary_search_index_reader.h"
#include "table/block_based/block_based_table_builder.h" #include "table/block_based/block_based_table_builder.h"

View File

@ -14,6 +14,7 @@
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "file/writable_file_writer.h" #include "file/writable_file_writer.h"
#include "rocksdb/db.h"
#include "rocksdb/file_system.h" #include "rocksdb/file_system.h"
#include "table/meta_blocks.h" #include "table/meta_blocks.h"
#include "test_util/testharness.h" #include "test_util/testharness.h"

View File

@ -14,7 +14,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "db/dbformat.h"
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"

View File

@ -19,6 +19,7 @@ int main() {
#include <vector> #include <vector>
#include "memory/arena.h" #include "memory/arena.h"
#include "rocksdb/db.h"
#include "table/cuckoo/cuckoo_table_builder.h" #include "table/cuckoo/cuckoo_table_builder.h"
#include "table/cuckoo/cuckoo_table_factory.h" #include "table/cuckoo/cuckoo_table_factory.h"
#include "table/cuckoo/cuckoo_table_reader.h" #include "table/cuckoo/cuckoo_table_reader.h"

View File

@ -5,6 +5,7 @@
#include "table/get_context.h" #include "table/get_context.h"
#include "db/blob//blob_fetcher.h"
#include "db/merge_helper.h" #include "db/merge_helper.h"
#include "db/pinned_iterators_manager.h" #include "db/pinned_iterators_manager.h"
#include "db/read_callback.h" #include "db/read_callback.h"

View File

@ -6,18 +6,19 @@
#pragma once #pragma once
#include <string> #include <string>
#include "db/blob/blob_fetcher.h"
#include "db/dbformat.h"
#include "db/merge_context.h"
#include "db/read_callback.h" #include "db/read_callback.h"
#include "rocksdb/statistics.h"
#include "rocksdb/types.h" #include "rocksdb/types.h"
#include "table/block_based/block.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
class BlobFetcher;
class Comparator;
class Logger;
class MergeContext; class MergeContext;
class MergeOperator;
class PinnedIteratorsManager; class PinnedIteratorsManager;
class Statistics;
class SystemClock; class SystemClock;
struct ParsedInternalKey;
// Data structure for accumulating statistics during a point lookup. At the // Data structure for accumulating statistics during a point lookup. At the
// end of the point lookup, the corresponding ticker stats are updated. This // end of the point lookup, the corresponding ticker stats are updated. This

View File

@ -9,14 +9,14 @@
#pragma once #pragma once
#include "db/dbformat.h" #include "rocksdb/slice.h"
#include "rocksdb/types.h" #include "rocksdb/types.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
class Comparator;
class Env;
class Arena; class Arena;
class InternalKeyComparator;
template <class TValue> template <class TValue>
class InternalIteratorBase; class InternalIteratorBase;
using InternalIterator = InternalIteratorBase<Slice>; using InternalIterator = InternalIteratorBase<Slice>;

View File

@ -10,6 +10,7 @@
#include "block_fetcher.h" #include "block_fetcher.h"
#include "db/table_properties_collector.h" #include "db/table_properties_collector.h"
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "logging/logging.h"
#include "rocksdb/table.h" #include "rocksdb/table.h"
#include "rocksdb/table_properties.h" #include "rocksdb/table_properties.h"
#include "table/block_based/block.h" #include "table/block_based/block.h"

View File

@ -8,12 +8,13 @@
#include <assert.h> #include <assert.h>
#include <string>
#include <limits> #include <limits>
#include <map> #include <map>
#include <string>
#include "db/dbformat.h" #include "db/dbformat.h"
#include "file/writable_file_writer.h" #include "file/writable_file_writer.h"
#include "logging/logging.h"
#include "rocksdb/comparator.h" #include "rocksdb/comparator.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/filter_policy.h" #include "rocksdb/filter_policy.h"

View File

@ -4,10 +4,11 @@
// (found in the LICENSE.Apache file in the root directory). // (found in the LICENSE.Apache file in the root directory).
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
#include "table/plain/plain_table_index.h"
#include <cinttypes> #include <cinttypes>
#include "table/plain/plain_table_index.h" #include "logging/logging.h"
#include "util/coding.h" #include "util/coding.h"
#include "util/hash.h" #include "util/hash.h"

View File

@ -10,7 +10,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "db/dbformat.h"
#include "memory/arena.h" #include "memory/arena.h"
#include "monitoring/histogram.h" #include "monitoring/histogram.h"
#include "options/cf_options.h" #include "options/cf_options.h"

View File

@ -8,7 +8,7 @@
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
#include <array> #include <array>
#include "db/dbformat.h"
#include "rocksdb/slice.h" #include "rocksdb/slice.h"
#include "table/plain/plain_table_reader.h" #include "table/plain/plain_table_reader.h"

View File

@ -12,7 +12,6 @@
#include <string> #include <string>
#include <stdint.h> #include <stdint.h>
#include "db/dbformat.h"
#include "file/random_access_file_reader.h" #include "file/random_access_file_reader.h"
#include "memory/arena.h" #include "memory/arena.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"

View File

@ -5,9 +5,10 @@
#pragma once #pragma once
#include <string> #include <string>
#include "db/dbformat.h"
#include "db/table_properties_collector.h" #include "db/table_properties_collector.h"
#include "rocksdb/types.h" #include "rocksdb/types.h"
#include "util/coding.h"
#include "util/string_util.h" #include "util/string_util.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {

View File

@ -31,6 +31,7 @@
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/file_checksum.h" #include "rocksdb/file_checksum.h"
#include "rocksdb/file_system.h" #include "rocksdb/file_system.h"
#include "rocksdb/filter_policy.h"
#include "rocksdb/iterator.h" #include "rocksdb/iterator.h"
#include "rocksdb/memtablerep.h" #include "rocksdb/memtablerep.h"
#include "rocksdb/perf_context.h" #include "rocksdb/perf_context.h"

View File

@ -18,6 +18,7 @@ int main() {
#include <map> #include <map>
#include <vector> #include <vector>
#include "rocksdb/db.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/status.h" #include "rocksdb/status.h"
#include "rocksdb/trace_reader_writer.h" #include "rocksdb/trace_reader_writer.h"

View File

@ -16,6 +16,7 @@ int main() {
#include <string> #include <string>
#include <vector> #include <vector>
#include "rocksdb/db.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/status.h" #include "rocksdb/status.h"
#include "rocksdb/trace_reader_writer.h" #include "rocksdb/trace_reader_writer.h"

View File

@ -25,6 +25,7 @@
#include "file/filename.h" #include "file/filename.h"
#include "rocksdb/cache.h" #include "rocksdb/cache.h"
#include "rocksdb/file_checksum.h" #include "rocksdb/file_checksum.h"
#include "rocksdb/filter_policy.h"
#include "rocksdb/table_properties.h" #include "rocksdb/table_properties.h"
#include "rocksdb/utilities/backupable_db.h" #include "rocksdb/utilities/backupable_db.h"
#include "rocksdb/utilities/checkpoint.h" #include "rocksdb/utilities/checkpoint.h"

View File

@ -5,6 +5,7 @@
#include "trace_replay/block_cache_tracer.h" #include "trace_replay/block_cache_tracer.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/status.h" #include "rocksdb/status.h"
#include "rocksdb/trace_reader_writer.h" #include "rocksdb/trace_reader_writer.h"

View File

@ -5,6 +5,7 @@
#include "trace_replay/io_tracer.h" #include "trace_replay/io_tracer.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/status.h" #include "rocksdb/status.h"
#include "rocksdb/trace_reader_writer.h" #include "rocksdb/trace_reader_writer.h"

View File

@ -5,7 +5,10 @@
#pragma once #pragma once
#include <cstdint>
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "logging/logging.h"
#include "util/set_comparator.h" #include "util/set_comparator.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {

View File

@ -10,6 +10,7 @@
#include <cinttypes> #include <cinttypes>
#include "db/dbformat.h" #include "db/dbformat.h"
#include "logging/logging.h"
#include "rocksdb/system_clock.h" #include "rocksdb/system_clock.h"
#include "test_util/sync_point.h" #include "test_util/sync_point.h"

View File

@ -8,6 +8,8 @@
#include "utilities/blob_db/blob_db.h" #include "utilities/blob_db/blob_db.h"
#include <cinttypes> #include <cinttypes>
#include "logging/logging.h"
#include "utilities/blob_db/blob_db_impl.h" #include "utilities/blob_db/blob_db_impl.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {

View File

@ -20,6 +20,7 @@
#include "db/wal_manager.h" #include "db/wal_manager.h"
#include "file/file_util.h" #include "file/file_util.h"
#include "file/filename.h" #include "file/filename.h"
#include "logging/logging.h"
#include "port/port.h" #include "port/port.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"

View File

@ -14,6 +14,7 @@
#include "db/column_family.h" #include "db/column_family.h"
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "logging/logging.h"
#include "rocksdb/comparator.h" #include "rocksdb/comparator.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/snapshot.h" #include "rocksdb/snapshot.h"

View File

@ -13,6 +13,7 @@
#include <vector> #include <vector>
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "logging/logging.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "rocksdb/utilities/transaction_db.h" #include "rocksdb/utilities/transaction_db.h"

View File

@ -11,6 +11,7 @@
#include "db/column_family.h" #include "db/column_family.h"
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "logging/logging.h"
#include "rocksdb/comparator.h" #include "rocksdb/comparator.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/status.h" #include "rocksdb/status.h"

View File

@ -15,6 +15,7 @@
#include "db/arena_wrapped_db_iter.h" #include "db/arena_wrapped_db_iter.h"
#include "db/db_impl/db_impl.h" #include "db/db_impl/db_impl.h"
#include "logging/logging.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "rocksdb/utilities/transaction_db.h" #include "rocksdb/utilities/transaction_db.h"

View File

@ -18,6 +18,7 @@
#include "db/pre_release_callback.h" #include "db/pre_release_callback.h"
#include "db/read_callback.h" #include "db/read_callback.h"
#include "db/snapshot_checker.h" #include "db/snapshot_checker.h"
#include "logging/logging.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "rocksdb/utilities/transaction_db.h" #include "rocksdb/utilities/transaction_db.h"

View File

@ -8,6 +8,7 @@
#include "db/write_batch_internal.h" #include "db/write_batch_internal.h"
#include "file/filename.h" #include "file/filename.h"
#include "logging/logging.h"
#include "rocksdb/convenience.h" #include "rocksdb/convenience.h"
#include "rocksdb/env.h" #include "rocksdb/env.h"
#include "rocksdb/iterator.h" #include "rocksdb/iterator.h"