Skip to content

Commit

Permalink
config: remove inclusions of db/config.hh from header files
Browse files Browse the repository at this point in the history
Instead, distribute those inclusions to .cc files that require them. This
reduces rebuilds when config.hh changes, and makes it easier to locate files
that need config disaggregation.
  • Loading branch information
avikivity committed Dec 9, 2018
1 parent 6a5d893 commit 864f55e
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions cql3/query_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "cql3/error_collector.hh"
#include "cql3/statements/batch_statement.hh"
#include "cql3/util.hh"
#include "db/config.hh"

namespace cql3 {

Expand Down
1 change: 1 addition & 0 deletions cql3/statements/create_table_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include "auth/service.hh"
#include "schema_builder.hh"
#include "service/storage_service.hh"
#include "db/config.hh"

namespace cql3 {

Expand Down
1 change: 1 addition & 0 deletions db/commitlog/commitlog_replayer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include "schema_registry.hh"
#include "commitlog_entry.hh"
#include "service/priority_manager.hh"
#include "db/config.hh"

static logging::logger rlogger("commitlog_replayer");

Expand Down
1 change: 1 addition & 0 deletions dht/boot_strapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "dht/range_streamer.hh"
#include "gms/failure_detector.hh"
#include "log.hh"
#include "db/config.hh"

static logging::logger blogger("boot_strapper");

Expand Down
1 change: 0 additions & 1 deletion dht/boot_strapper.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "dht/i_partitioner.hh"
#include <unordered_set>
#include "database.hh"
#include "db/config.hh"

namespace dht {

Expand Down
1 change: 1 addition & 0 deletions dht/range_streamer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "streaming/stream_plan.hh"
#include "streaming/stream_state.hh"
#include "service/storage_service.hh"
#include "db/config.hh"
#include <seastar/core/semaphore.hh>
#include <boost/range/adaptors.hpp>

Expand Down
1 change: 1 addition & 0 deletions gms/failure_detector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "gms/inet_address.hh"
#include "service/storage_service.hh"
#include "log.hh"
#include "db/config.hh"
#include <iostream>
#include <chrono>

Expand Down
1 change: 1 addition & 0 deletions gms/gossiper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <seastar/util/defer.hh>
#include <chrono>
#include "dht/i_partitioner.hh"
#include "db/config.hh"
#include <boost/range/algorithm/set_algorithm.hpp>
#include <boost/range/adaptors.hpp>

Expand Down
1 change: 1 addition & 0 deletions init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "gms/inet_address.hh"
#include "gms/feature_service.hh"
#include "seastarx.hh"
#include "db/config.hh"

logging::logger startlog("init");

Expand Down
2 changes: 1 addition & 1 deletion init.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
#include <seastar/core/future.hh>
#include <seastar/core/distributed.hh>
#include "auth/service.hh"
#include "db/config.hh"
#include "db/system_distributed_keyspace.hh"
#include "database.hh"
#include "log.hh"
#include "seastarx.hh"

namespace db {
class extensions;
class seed_provider_type;
}

namespace gms {
Expand Down
1 change: 0 additions & 1 deletion service/storage_proxy.hh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include "tracing/trace_state.hh"
#include <seastar/core/metrics.hh>
#include "frozen_mutation.hh"
#include "db/config.hh"
#include "storage_proxy_stats.hh"

namespace compat {
Expand Down
1 change: 1 addition & 0 deletions service/storage_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#include "supervisor.hh"
#include "sstables/compaction_manager.hh"
#include "sstables/sstables.hh"
#include "db/config.hh"
#include <seastar/core/metrics.hh>

using token = dht::token;
Expand Down
1 change: 1 addition & 0 deletions sstables/sstables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
#include "unimplemented.hh"
#include "vint-serialization.hh"
#include "db/large_partition_handler.hh"
#include "db/config.hh"
#include "sstables/random_access_reader.hh"
#include "utils/UUID_gen.hh"
#include <boost/algorithm/string/predicate.hpp>
Expand Down
1 change: 1 addition & 0 deletions tests/querier_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "service/priority_manager.hh"
#include "tests/simple_schema.hh"
#include "tests/cql_test_env.hh"
#include "db/config.hh"

#include <seastar/core/sleep.hh>
#include <seastar/core/thread.hh>
Expand Down
1 change: 1 addition & 0 deletions thrift/handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <boost/range/adaptor/indirected.hpp>
#include "query-result-reader.hh"
#include "thrift/server.hh"
#include "db/config.hh"

using namespace ::apache::thrift;
using namespace ::apache::thrift::protocol;
Expand Down

0 comments on commit 864f55e

Please sign in to comment.