Change internal headers with duplicate names (#11408)

Summary:
In IDE navigation I find it annoying that there are two statistics.h files (etc.) and often land on the wrong one. Here I migrate several headers to use the blah.h <- blah_impl.h <- blah.cc idiom. Although clang-format wants "blah.h" to be the top include for "blah.cc", I think overall this is an improvement.

No public API changes.

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

Test Plan: existing tests

Reviewed By: ltamasi

Differential Revision: D45456696

Pulled By: pdillinger

fbshipit-source-id: 809d931253f3272c908cf5facf7e1d32fc507373
oxigraph-8.3.2
Peter Dillinger 2 years ago committed by Facebook GitHub Bot
parent 5fc57eec2b
commit 206fdea3d9
  1. 2
      cache/clock_cache.cc
  2. 2
      cache/compressed_secondary_cache.cc
  3. 2
      cache/compressed_secondary_cache.h
  4. 2
      cache/lru_cache.cc
  5. 2
      db/blob/blob_contents.h
  6. 2
      db/blob/blob_file_reader.cc
  7. 2
      db/blob/blob_log_sequential_reader.cc
  8. 2
      db/blob/blob_log_writer.cc
  9. 2
      db/blob/blob_source.cc
  10. 4
      db/compaction/compaction_job_stats_test.cc
  11. 2
      db/compaction/compaction_picker.cc
  12. 2
      db/compaction/compaction_picker_universal.cc
  13. 2
      db/db_impl/db_impl_open.cc
  14. 2
      db/db_iterator_test.cc
  15. 2
      db/db_test.cc
  16. 4
      db/listener_test.cc
  17. 2
      db/memtable.cc
  18. 2
      db/merge_helper.cc
  19. 2
      db/write_batch.cc
  20. 2
      env/mock_env.cc
  21. 2
      file/file_prefetch_buffer.cc
  22. 2
      file/file_prefetch_buffer.h
  23. 2
      file/random_access_file_reader.cc
  24. 2
      file/readahead_raf.cc
  25. 2
      file/sequence_file_reader.cc
  26. 2
      file/writable_file_writer.cc
  27. 2
      java/rocksjni/statisticsjni.h
  28. 0
      memory/memory_allocator_impl.h
  29. 2
      monitoring/instrumented_mutex.h
  30. 2
      monitoring/perf_step_timer.h
  31. 4
      monitoring/statistics.cc
  32. 0
      monitoring/statistics_impl.h
  33. 2
      options/customizable_test.cc
  34. 2
      options/options.cc
  35. 2
      table/block_based/block_based_table_builder.cc
  36. 2
      table/block_based/flush_block_policy.cc
  37. 0
      table/block_based/flush_block_policy_impl.h
  38. 2
      table/block_fetcher.cc
  39. 2
      table/block_fetcher.h
  40. 4
      table/format.cc
  41. 2
      table/format.h
  42. 2
      table/get_context.cc
  43. 2
      table/persistent_cache_helper.h
  44. 2
      table/persistent_cache_options.h
  45. 4
      table/table_test.cc
  46. 2
      tools/db_bench_tool.cc
  47. 2
      util/compression.h
  48. 5
      util/rate_limiter.cc
  49. 0
      util/rate_limiter_impl.h
  50. 3
      util/rate_limiter_test.cc
  51. 2
      util/stop_watch.h
  52. 4
      utilities/agg_merge/agg_merge.cc
  53. 0
      utilities/agg_merge/agg_merge_impl.h
  54. 2
      utilities/agg_merge/agg_merge_test.cc
  55. 2
      utilities/agg_merge/test_agg_merge.cc
  56. 2
      utilities/backup/backup_engine.cc
  57. 2
      utilities/backup/backup_engine_test.cc
  58. 2
      utilities/blob_db/blob_compaction_filter.h
  59. 2
      utilities/blob_db/blob_db_impl.cc
  60. 2
      utilities/simulator_cache/sim_cache.cc

@ -16,7 +16,7 @@
#include "cache/secondary_cache_adapter.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/lang.h"
#include "rocksdb/env.h"
#include "util/hash.h"

@ -9,7 +9,7 @@
#include <cstdint>
#include <memory>
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "monitoring/perf_context_imp.h"
#include "util/compression.h"
#include "util/string_util.h"

@ -10,7 +10,7 @@
#include <memory>
#include "cache/lru_cache.h"
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "rocksdb/secondary_cache.h"
#include "rocksdb/slice.h"
#include "rocksdb/status.h"

@ -16,7 +16,7 @@
#include "cache/secondary_cache_adapter.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/lang.h"
#include "util/distributed_mutex.h"

@ -7,7 +7,7 @@
#include <memory>
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "rocksdb/advanced_cache.h"
#include "rocksdb/rocksdb_namespace.h"
#include "rocksdb/slice.h"

@ -12,7 +12,7 @@
#include "db/blob/blob_log_format.h"
#include "file/file_prefetch_buffer.h"
#include "file/filename.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "options/cf_options.h"
#include "rocksdb/file_system.h"
#include "rocksdb/slice.h"

@ -7,7 +7,7 @@
#include "db/blob/blob_log_sequential_reader.h"
#include "file/random_access_file_reader.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "util/stop_watch.h"
namespace ROCKSDB_NAMESPACE {

@ -10,7 +10,7 @@
#include "db/blob/blob_log_format.h"
#include "file/writable_file_writer.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/system_clock.h"
#include "test_util/sync_point.h"
#include "util/coding.h"

@ -13,7 +13,7 @@
#include "db/blob/blob_contents.h"
#include "db/blob/blob_file_reader.h"
#include "db/blob/blob_log_format.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "options/cf_options.h"
#include "table/get_context.h"
#include "table/multiget_context.h"

@ -24,7 +24,7 @@
#include "db/write_batch_internal.h"
#include "env/mock_env.h"
#include "file/filename.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "monitoring/thread_status_util.h"
#include "port/stack_trace.h"
#include "rocksdb/cache.h"
@ -54,7 +54,7 @@
#include "util/compression.h"
#include "util/hash.h"
#include "util/mutexlock.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
#include "util/string_util.h"
#include "utilities/merge_operators.h"

@ -20,7 +20,7 @@
#include "file/filename.h"
#include "logging/log_buffer.h"
#include "logging/logging.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "test_util/sync_point.h"
#include "util/random.h"
#include "util/string_util.h"

@ -19,7 +19,7 @@
#include "file/filename.h"
#include "logging/log_buffer.h"
#include "logging/logging.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "test_util/sync_point.h"
#include "util/random.h"
#include "util/string_util.h"

@ -24,7 +24,7 @@
#include "rocksdb/table.h"
#include "rocksdb/wal_filter.h"
#include "test_util/sync_point.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
namespace ROCKSDB_NAMESPACE {
Options SanitizeOptions(const std::string& dbname, const Options& src,

@ -16,7 +16,7 @@
#include "port/stack_trace.h"
#include "rocksdb/iostats_context.h"
#include "rocksdb/perf_context.h"
#include "table/block_based/flush_block_policy.h"
#include "table/block_based/flush_block_policy_impl.h"
#include "util/random.h"
#include "utilities/merge_operators/string_append/stringappend2.h"

@ -66,7 +66,7 @@
#include "util/compression.h"
#include "util/mutexlock.h"
#include "util/random.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
#include "util/string_util.h"
#include "utilities/merge_operators.h"

@ -12,7 +12,7 @@
#include "db/version_set.h"
#include "db/write_batch_internal.h"
#include "file/filename.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/cache.h"
#include "rocksdb/compaction_filter.h"
#include "rocksdb/db.h"
@ -29,7 +29,7 @@
#include "test_util/testutil.h"
#include "util/hash.h"
#include "util/mutexlock.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
#include "util/string_util.h"
#include "utilities/merge_operators.h"

@ -26,7 +26,7 @@
#include "memory/arena.h"
#include "memory/memory_usage.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/lang.h"
#include "port/port.h"
#include "rocksdb/comparator.h"

@ -15,7 +15,7 @@
#include "db/wide/wide_column_serialization.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/likely.h"
#include "rocksdb/comparator.h"
#include "rocksdb/db.h"

@ -59,7 +59,7 @@
#include "db/wide/wide_column_serialization.h"
#include "db/write_batch_internal.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/lang.h"
#include "rocksdb/merge_operator.h"
#include "rocksdb/system_clock.h"

2
env/mock_env.cc vendored

@ -21,7 +21,7 @@
#include "util/cast_util.h"
#include "util/hash.h"
#include "util/random.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
#include "util/string_util.h"
namespace ROCKSDB_NAMESPACE {

@ -18,7 +18,7 @@
#include "port/port.h"
#include "test_util/sync_point.h"
#include "util/random.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
namespace ROCKSDB_NAMESPACE {

@ -15,7 +15,7 @@
#include <string>
#include "file/readahead_file_info.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/port.h"
#include "rocksdb/env.h"
#include "rocksdb/file_system.h"

@ -19,7 +19,7 @@
#include "table/format.h"
#include "test_util/sync_point.h"
#include "util/random.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
namespace ROCKSDB_NAMESPACE {
const std::array<Histograms, std::size_t(Env::IOActivity::kUnknown)>

@ -15,7 +15,7 @@
#include "file/read_write_util.h"
#include "rocksdb/file_system.h"
#include "util/aligned_buffer.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
namespace ROCKSDB_NAMESPACE {
namespace {

@ -19,7 +19,7 @@
#include "test_util/sync_point.h"
#include "util/aligned_buffer.h"
#include "util/random.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
namespace ROCKSDB_NAMESPACE {
IOStatus SequentialFileReader::Create(

@ -21,7 +21,7 @@
#include "test_util/sync_point.h"
#include "util/crc32c.h"
#include "util/random.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
namespace ROCKSDB_NAMESPACE {
IOStatus WritableFileWriter::Create(const std::shared_ptr<FileSystem>& fs,

@ -13,7 +13,7 @@
#include <set>
#include <string>
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/statistics.h"
namespace ROCKSDB_NAMESPACE {

@ -5,7 +5,7 @@
#pragma once
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/port.h"
#include "rocksdb/statistics.h"
#include "rocksdb/system_clock.h"

@ -5,7 +5,7 @@
//
#pragma once
#include "monitoring/perf_level_imp.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/system_clock.h"
namespace ROCKSDB_NAMESPACE {

@ -3,14 +3,14 @@
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
//
#include "monitoring/statistics.h"
#include "rocksdb/statistics.h"
#include <algorithm>
#include <cinttypes>
#include <cstdio>
#include "monitoring/statistics_impl.h"
#include "rocksdb/convenience.h"
#include "rocksdb/statistics.h"
#include "rocksdb/utilities/customizable_util.h"
#include "rocksdb/utilities/options_type.h"
#include "util/string_util.h"

@ -35,7 +35,7 @@
#include "rocksdb/utilities/object_registry.h"
#include "rocksdb/utilities/options_type.h"
#include "table/block_based/filter_policy_internal.h"
#include "table/block_based/flush_block_policy.h"
#include "table/block_based/flush_block_policy_impl.h"
#include "table/mock_table.h"
#include "test_util/mock_time_env.h"
#include "test_util/testharness.h"

@ -13,7 +13,7 @@
#include <limits>
#include "logging/logging.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "options/db_options.h"
#include "options/options_helper.h"
#include "rocksdb/cache.h"

@ -29,7 +29,7 @@
#include "db/dbformat.h"
#include "index_builder.h"
#include "logging/logging.h"
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "rocksdb/cache.h"
#include "rocksdb/comparator.h"
#include "rocksdb/env.h"

@ -13,7 +13,7 @@
#include "rocksdb/utilities/customizable_util.h"
#include "table/block_based/block_based_table_reader.h"
#include "table/block_based/block_builder.h"
#include "table/block_based/flush_block_policy.h"
#include "table/block_based/flush_block_policy_impl.h"
#include "table/format.h"
namespace ROCKSDB_NAMESPACE {

@ -14,7 +14,7 @@
#include <string>
#include "logging/logging.h"
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "monitoring/perf_context_imp.h"
#include "rocksdb/compression_type.h"
#include "rocksdb/env.h"

@ -8,7 +8,7 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#pragma once
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "table/block_based/block.h"
#include "table/block_based/block_type.h"
#include "table/format.h"

@ -14,9 +14,9 @@
#include "block_fetcher.h"
#include "file/random_access_file_reader.h"
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "options/options_helper.h"
#include "rocksdb/env.h"
#include "rocksdb/options.h"

@ -15,7 +15,7 @@
#include "file/file_prefetch_buffer.h"
#include "file/random_access_file_reader.h"
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "options/cf_options.h"
#include "port/malloc.h"
#include "port/port.h" // noexcept

@ -12,7 +12,7 @@
#include "db/wide/wide_column_serialization.h"
#include "monitoring/file_read_sample.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/merge_operator.h"
#include "rocksdb/statistics.h"
#include "rocksdb/system_clock.h"

@ -6,7 +6,7 @@
#include <string>
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "table/format.h"
#include "table/persistent_cache_options.h"

@ -7,7 +7,7 @@
#include <string>
#include "cache/cache_key.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/persistent_cache.h"
namespace ROCKSDB_NAMESPACE {

@ -27,7 +27,7 @@
#include "db/memtable.h"
#include "db/write_batch_internal.h"
#include "memtable/stl_wrappers.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "options/options_helper.h"
#include "port/port.h"
#include "port/stack_trace.h"
@ -55,7 +55,7 @@
#include "table/block_based/block_based_table_reader.h"
#include "table/block_based/block_builder.h"
#include "table/block_based/filter_policy_internal.h"
#include "table/block_based/flush_block_policy.h"
#include "table/block_based/flush_block_policy_impl.h"
#include "table/block_fetcher.h"
#include "table/format.h"
#include "table/get_context.h"

@ -42,7 +42,7 @@
#include "db/malloc_stats.h"
#include "db/version_set.h"
#include "monitoring/histogram.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "options/cf_options.h"
#include "port/port.h"
#include "port/stack_trace.h"

@ -20,7 +20,7 @@
#endif // ROCKSDB_MALLOC_USABLE_SIZE
#include <string>
#include "memory/memory_allocator.h"
#include "memory/memory_allocator_impl.h"
#include "rocksdb/options.h"
#include "rocksdb/table.h"
#include "table/block_based/block_type.h"

@ -7,15 +7,14 @@
// 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 "util/rate_limiter.h"
#include <algorithm>
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/port.h"
#include "rocksdb/system_clock.h"
#include "test_util/sync_point.h"
#include "util/aligned_buffer.h"
#include "util/rate_limiter_impl.h"
namespace ROCKSDB_NAMESPACE {
size_t RateLimiter::RequestToken(size_t bytes, size_t alignment,

@ -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 "util/rate_limiter.h"
#include <chrono>
#include <cinttypes>
#include <cstdint>
@ -20,6 +18,7 @@
#include "test_util/sync_point.h"
#include "test_util/testharness.h"
#include "util/random.h"
#include "util/rate_limiter_impl.h"
namespace ROCKSDB_NAMESPACE {

@ -4,7 +4,7 @@
// (found in the LICENSE.Apache file in the root directory).
//
#pragma once
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/system_clock.h"
namespace ROCKSDB_NAMESPACE {

@ -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 "utilities/agg_merge/agg_merge.h"
#include "rocksdb/utilities/agg_merge.h"
#include <assert.h>
@ -17,9 +17,9 @@
#include "port/likely.h"
#include "rocksdb/merge_operator.h"
#include "rocksdb/slice.h"
#include "rocksdb/utilities/agg_merge.h"
#include "rocksdb/utilities/options_type.h"
#include "util/coding.h"
#include "utilities/agg_merge/agg_merge_impl.h"
#include "utilities/merge_operators.h"
namespace ROCKSDB_NAMESPACE {

@ -12,7 +12,7 @@
#include "db/db_test_util.h"
#include "rocksdb/options.h"
#include "test_util/testharness.h"
#include "utilities/agg_merge/agg_merge.h"
#include "utilities/agg_merge/agg_merge_impl.h"
#include "utilities/agg_merge/test_agg_merge.h"
namespace ROCKSDB_NAMESPACE {

@ -11,7 +11,7 @@
#include <vector>
#include "util/coding.h"
#include "utilities/agg_merge/agg_merge.h"
#include "utilities/agg_merge/agg_merge_impl.h"
namespace ROCKSDB_NAMESPACE {

@ -49,7 +49,7 @@
#include "util/coding.h"
#include "util/crc32c.h"
#include "util/math.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
#include "util/string_util.h"
#include "utilities/backup/backup_engine_impl.h"
#include "utilities/checkpoint/checkpoint_impl.h"

@ -46,7 +46,7 @@
#include "util/cast_util.h"
#include "util/mutexlock.h"
#include "util/random.h"
#include "util/rate_limiter.h"
#include "util/rate_limiter_impl.h"
#include "util/stderr_logger.h"
#include "util/string_util.h"
#include "utilities/backup/backup_engine_impl.h"

@ -7,7 +7,7 @@
#include <unordered_set>
#include "db/blob/blob_index.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/compaction_filter.h"
#include "utilities/blob_db/blob_db_gc_stats.h"
#include "utilities/blob_db/blob_db_impl.h"

@ -22,7 +22,7 @@
#include "file/writable_file_writer.h"
#include "logging/logging.h"
#include "monitoring/instrumented_mutex.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "rocksdb/convenience.h"
#include "rocksdb/env.h"
#include "rocksdb/iterator.h"

@ -9,7 +9,7 @@
#include <iomanip>
#include "file/writable_file_writer.h"
#include "monitoring/statistics.h"
#include "monitoring/statistics_impl.h"
#include "port/port.h"
#include "rocksdb/env.h"
#include "rocksdb/file_system.h"

Loading…
Cancel
Save