From 3f603f024fc9ff34eacf767a2a74d83cab1ae194 Mon Sep 17 00:00:00 2001 From: Jan Christoph Uhde Date: Fri, 7 Jun 2019 13:27:24 +0200 Subject: [PATCH] remove some containers from common.h (#9223) * remove some containers from Common.h * enterprise fixes --- arangod/Agency/AgencyComm.cpp | 1 + arangod/Agency/AgencyComm.h | 1 + arangod/Agency/Store.h | 1 + arangod/Aql/AqlTransaction.cpp | 2 +- arangod/Aql/AqlTransaction.h | 4 +++- arangod/Aql/Collections.h | 2 ++ arangod/Aql/DocumentProducingNode.h | 2 ++ arangod/Aql/EngineInfoContainerDBServer.h | 1 + arangod/Aql/ExecutionStats.h | 3 ++- arangod/Aql/ExecutorInfos.h | 2 ++ arangod/Aql/Optimizer.h | 3 ++- arangod/Aql/OptimizerRulesFeature.h | 2 ++ arangod/Aql/QueryCache.h | 7 +++--- arangod/Aql/QueryCursor.h | 2 ++ arangod/Aql/QueryOptions.h | 2 ++ arangod/Aql/QueryResult.h | 15 +++++++------ arangod/Auth/Handler.h | 1 + arangod/Auth/User.h | 2 ++ arangod/Cluster/ClusterRepairOperations.h | 2 +- arangod/Cluster/HeartbeatThread.cpp | 8 ++++--- arangod/Cluster/MaintenanceFeature.cpp | 4 +++- .../Graph/ConstantWeightShortestPathFinder.h | 1 + arangod/Graph/Graph.h | 1 + arangod/Graph/ShortestPathPriorityQueue.h | 1 + arangod/Graph/ShortestPathResult.h | 1 + arangod/Graph/TraverserCache.h | 1 + .../IResearchRocksDBRecoveryHelper.h | 3 ++- arangod/MMFiles/MMFilesFulltextIndex.h | 5 +++-- arangod/MMFiles/MMFilesSkiplistIndex.cpp | 4 +++- arangod/MMFiles/mmfiles-fulltext-index.h | 2 ++ arangod/MMFiles/mmfiles-fulltext-list.h | 2 ++ arangod/Pregel/CommonFormats.h | 2 ++ arangod/Pregel/IncomingCache.h | 1 + arangod/Pregel/Recovery.h | 2 ++ arangod/Pregel/WorkerConfig.h | 9 +++++--- .../ReplicationApplierConfiguration.h | 1 + arangod/Replication/utilities.h | 1 + arangod/RocksDBEngine/RocksDBCollectionMeta.h | 6 +++-- .../RocksDBCuckooIndexEstimator.h | 22 ++++++++++--------- arangod/Sharding/ShardingInfo.h | 3 +-- arangod/StorageEngine/TransactionState.h | 20 +++++++++-------- arangod/StorageEngine/WalAccess.h | 4 +++- arangod/Utils/CollectionExport.h | 1 + arangod/VocBase/voc-types.h | 2 ++ lib/ApplicationFeatures/ApplicationFeature.h | 4 +++- lib/Basics/Common.h | 4 ---- lib/Basics/DeadlockDetector.h | 1 + lib/Basics/Utf8Helper.h | 1 + lib/Basics/debugging.cpp | 1 + lib/Endpoint/EndpointList.h | 1 + lib/Geo/GeoUtils.cpp | 1 + lib/Logger/LogAppender.h | 2 ++ lib/Logger/LogTimeFormat.h | 1 + lib/Logger/LogTopic.cpp | 1 + lib/Maskings/Maskings.h | 2 ++ lib/ProgramOptions/IniFileParser.h | 6 +++-- lib/ProgramOptions/Parameters.h | 3 ++- lib/ProgramOptions/Section.h | 2 ++ lib/Rest/Version.h | 2 ++ lib/Ssl/ssl-helper.h | 1 + lib/Utilities/ScriptLoader.h | 2 ++ tests/Geo/NearUtilsTest.cpp | 3 ++- tests/IResearch/AgencyCommManagerMock.h | 4 ++-- tests/IResearch/VelocyPackHelper-test.cpp | 1 + tests/Mocks/StorageEngineMock.h | 4 +++- 65 files changed, 147 insertions(+), 62 deletions(-) diff --git a/arangod/Agency/AgencyComm.cpp b/arangod/Agency/AgencyComm.cpp index 5a5d44e67f..268c4b1c24 100644 --- a/arangod/Agency/AgencyComm.cpp +++ b/arangod/Agency/AgencyComm.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include "Basics/ReadLocker.h" #include "Basics/StringBuffer.h" diff --git a/arangod/Agency/AgencyComm.h b/arangod/Agency/AgencyComm.h index 0774eb6879..af0b6b85b7 100644 --- a/arangod/Agency/AgencyComm.h +++ b/arangod/Agency/AgencyComm.h @@ -28,6 +28,7 @@ #include "Basics/Common.h" #include +#include #include #include diff --git a/arangod/Agency/Store.h b/arangod/Agency/Store.h index d0fea25d2e..697ec55d57 100644 --- a/arangod/Agency/Store.h +++ b/arangod/Agency/Store.h @@ -27,6 +27,7 @@ #include "AgentInterface.h" #include "Basics/ConditionVariable.h" #include "Node.h" +#include namespace arangodb { namespace consensus { diff --git a/arangod/Aql/AqlTransaction.cpp b/arangod/Aql/AqlTransaction.cpp index 597bf6618a..e99a5319a7 100644 --- a/arangod/Aql/AqlTransaction.cpp +++ b/arangod/Aql/AqlTransaction.cpp @@ -49,7 +49,7 @@ std::shared_ptr AqlTransaction::create( #endif return std::make_shared(transactionContext, collections, options, isMainTransaction); } - + /// @brief add a list of collections to the transaction Result AqlTransaction::addCollections(std::map const& collections) { Result res; diff --git a/arangod/Aql/AqlTransaction.h b/arangod/Aql/AqlTransaction.h index 6b8def2df6..5a99dd142d 100644 --- a/arangod/Aql/AqlTransaction.h +++ b/arangod/Aql/AqlTransaction.h @@ -32,6 +32,8 @@ #include "Transaction/StandaloneContext.h" #include "VocBase/vocbase.h" +#include + namespace arangodb { namespace aql { @@ -70,7 +72,7 @@ class AqlTransaction : public transaction::Methods { AqlTransaction(std::shared_ptr const& transactionContext, std::map const* collections, transaction::Options const& options, bool isMainTransaction); - + /// @brief add a collection to the transaction Result processCollection(aql::Collection*); diff --git a/arangod/Aql/Collections.h b/arangod/Aql/Collections.h index f947aae2a8..62cd599345 100644 --- a/arangod/Aql/Collections.h +++ b/arangod/Aql/Collections.h @@ -27,6 +27,8 @@ #include "Basics/Common.h" #include "VocBase/AccessMode.h" +#include + struct TRI_vocbase_t; namespace arangodb { diff --git a/arangod/Aql/DocumentProducingNode.h b/arangod/Aql/DocumentProducingNode.h index 73a88f3394..dca96a2ffa 100644 --- a/arangod/Aql/DocumentProducingNode.h +++ b/arangod/Aql/DocumentProducingNode.h @@ -29,6 +29,8 @@ #include #include +#include + namespace arangodb { namespace aql { class ExecutionPlan; diff --git a/arangod/Aql/EngineInfoContainerDBServer.h b/arangod/Aql/EngineInfoContainerDBServer.h index 7ac9ea44c6..69870cd3cb 100644 --- a/arangod/Aql/EngineInfoContainerDBServer.h +++ b/arangod/Aql/EngineInfoContainerDBServer.h @@ -31,6 +31,7 @@ #include "Cluster/ClusterInfo.h" #include "VocBase/AccessMode.h" +#include #include #include diff --git a/arangod/Aql/ExecutionStats.h b/arangod/Aql/ExecutionStats.h index 5314789994..95f33eb124 100644 --- a/arangod/Aql/ExecutionStats.h +++ b/arangod/Aql/ExecutionStats.h @@ -28,6 +28,7 @@ #include #include +#include namespace arangodb { namespace velocypack { @@ -63,7 +64,7 @@ struct ExecutionStats { /// @brief sets query execution time from the outside void setExecutionTime(double value) { executionTime = value; } - + /// @brief sets the peak memory usage from the outside void setPeakMemoryUsage(size_t value) { peakMemoryUsage = value; } diff --git a/arangod/Aql/ExecutorInfos.h b/arangod/Aql/ExecutorInfos.h index 35abb35b17..6704dd6024 100644 --- a/arangod/Aql/ExecutorInfos.h +++ b/arangod/Aql/ExecutorInfos.h @@ -29,6 +29,8 @@ #include "Aql/types.h" #include "Basics/Common.h" +#include + namespace arangodb { namespace aql { diff --git a/arangod/Aql/Optimizer.h b/arangod/Aql/Optimizer.h index ae1407b193..ef1ab95160 100644 --- a/arangod/Aql/Optimizer.h +++ b/arangod/Aql/Optimizer.h @@ -29,6 +29,7 @@ #include "Basics/RollingVector.h" #include +#include namespace arangodb { namespace aql { @@ -134,7 +135,7 @@ class Optimizer { void addPlan(std::unique_ptr, OptimizerRule const*, bool, int newLevel = 0); void disableRule(int rule); - + bool isDisabled(int rule) const; /// @brief getPlans, ownership of the plans remains with the optimizer diff --git a/arangod/Aql/OptimizerRulesFeature.h b/arangod/Aql/OptimizerRulesFeature.h index 06f172b93a..c6b6ee27fb 100644 --- a/arangod/Aql/OptimizerRulesFeature.h +++ b/arangod/Aql/OptimizerRulesFeature.h @@ -23,6 +23,8 @@ #ifndef ARANGOD_AQL_OPTIMIZER_RULES_FEATURE_H #define ARANGOD_AQL_OPTIMIZER_RULES_FEATURE_H 1 +#include + #include "ApplicationFeatures/ApplicationFeature.h" #include "Aql/OptimizerRule.h" diff --git a/arangod/Aql/QueryCache.h b/arangod/Aql/QueryCache.h index 7266cde53b..4a8b95d7ed 100644 --- a/arangod/Aql/QueryCache.h +++ b/arangod/Aql/QueryCache.h @@ -29,6 +29,7 @@ #include "Basics/Mutex.h" #include "Basics/ReadWriteLock.h" +#include #include struct TRI_vocbase_t; @@ -64,7 +65,7 @@ struct QueryCacheResultEntry { QueryCacheResultEntry(uint64_t hash, QueryString const& queryString, std::shared_ptr const& queryResult, std::shared_ptr const& bindVars, - std::unordered_map&& dataSources + std::unordered_map&& dataSources ); ~QueryCacheResultEntry() = default; @@ -74,7 +75,7 @@ struct QueryCacheResultEntry { std::shared_ptr const _queryResult; std::shared_ptr const _bindVars; // stores datasource guid -> datasource name - std::unordered_map const _dataSources; + std::unordered_map const _dataSources; std::shared_ptr _stats; size_t _size; size_t _rows; @@ -145,7 +146,7 @@ struct QueryCacheDatabaseEntry { /// @brief hash table that contains all data souce-specific query results /// maps from data sources GUIDs to a set of query results as defined in /// _entriesByHash - std::unordered_map>> _entriesByDataSourceGuid; + std::unordered_map>> _entriesByDataSourceGuid; /// @brief beginning of linked list of result entries QueryCacheResultEntry* _head; diff --git a/arangod/Aql/QueryCursor.h b/arangod/Aql/QueryCursor.h index 20e27f5f91..1a04d5094b 100644 --- a/arangod/Aql/QueryCursor.h +++ b/arangod/Aql/QueryCursor.h @@ -32,6 +32,8 @@ #include "Utils/Cursor.h" #include "VocBase/vocbase.h" +#include + namespace arangodb { namespace aql { diff --git a/arangod/Aql/QueryOptions.h b/arangod/Aql/QueryOptions.h index 599100a518..b8134d8ae7 100644 --- a/arangod/Aql/QueryOptions.h +++ b/arangod/Aql/QueryOptions.h @@ -24,6 +24,8 @@ #ifndef ARANGOD_AQL_QUERY_OPTIONS_H #define ARANGOD_AQL_QUERY_OPTIONS_H 1 +#include + #include "Basics/Common.h" #include "Transaction/Options.h" diff --git a/arangod/Aql/QueryResult.h b/arangod/Aql/QueryResult.h index a184c637fb..4967ef9b61 100644 --- a/arangod/Aql/QueryResult.h +++ b/arangod/Aql/QueryResult.h @@ -24,6 +24,7 @@ #ifndef ARANGOD_AQL_QUERY_RESULT_H #define ARANGOD_AQL_QUERY_RESULT_H 1 +#include #include "Basics/Common.h" #include "Basics/Result.h" @@ -41,21 +42,21 @@ namespace aql { struct QueryResult { QueryResult& operator=(QueryResult const& other) = delete; QueryResult(QueryResult&& other) = default; - - QueryResult() + + QueryResult() : result(), cached(false) {} explicit QueryResult(Result const& res) : result(res), cached(false) {} - + explicit QueryResult(Result&& res) : result(std::move(res)), cached(false) {} virtual ~QueryResult() {} - + void reset(Result const& res) { result.reset(res); cached = false; @@ -63,7 +64,7 @@ struct QueryResult { extra.reset(); context.reset(); } - + void reset(Result&& res) { result.reset(std::move(res)); cached = false; @@ -71,7 +72,7 @@ struct QueryResult { extra.reset(); context.reset(); } - + // Result-like interface bool ok() const { return result.ok(); } bool fail() const { return result.fail(); } @@ -79,7 +80,7 @@ struct QueryResult { bool is(int errorNumber) const { return result.errorNumber() == errorNumber; } bool isNot(int errorNumber) const { return !is(errorNumber); } std::string errorMessage() const { return result.errorMessage(); } - + public: Result result; bool cached; diff --git a/arangod/Auth/Handler.h b/arangod/Auth/Handler.h index e8bf751857..f03fcf15a0 100644 --- a/arangod/Auth/Handler.h +++ b/arangod/Auth/Handler.h @@ -28,6 +28,7 @@ #include "Auth/Common.h" #include +#include namespace arangodb { namespace auth { diff --git a/arangod/Auth/User.h b/arangod/Auth/User.h index 72f6fa679a..3a1a294502 100644 --- a/arangod/Auth/User.h +++ b/arangod/Auth/User.h @@ -25,6 +25,8 @@ #ifndef ARANGOD_AUTHENTICATION_USER_H #define ARANGOD_AUTHENTICATION_USER_H 1 +#include + #include "Auth/Common.h" #include "VocBase/voc-types.h" diff --git a/arangod/Cluster/ClusterRepairOperations.h b/arangod/Cluster/ClusterRepairOperations.h index 8052b40f98..b45455bf49 100644 --- a/arangod/Cluster/ClusterRepairOperations.h +++ b/arangod/Cluster/ClusterRepairOperations.h @@ -27,7 +27,7 @@ #include #include - +#include #include "ClusterInfo.h" namespace arangodb { diff --git a/arangod/Cluster/HeartbeatThread.cpp b/arangod/Cluster/HeartbeatThread.cpp index 571b420fce..9cf1f2b3fc 100644 --- a/arangod/Cluster/HeartbeatThread.cpp +++ b/arangod/Cluster/HeartbeatThread.cpp @@ -23,6 +23,8 @@ #include "HeartbeatThread.h" +#include + #include #include #include @@ -992,7 +994,7 @@ void HeartbeatThread::runCoordinator() { } ClusterInfo::instance()->setFailedServers(failedServers); transaction::cluster::abortTransactionsWithFailedServers(); - + std::shared_ptr prgl = pregel::PregelFeature::instance(); if (prgl) { pregel::RecoveryManager* mngr = prgl->recoveryManager(); @@ -1000,8 +1002,8 @@ void HeartbeatThread::runCoordinator() { mngr->updatedFailedServers(failedServers); } } - - + + } else { LOG_TOPIC("cd95f", WARN, Logger::HEARTBEAT) << "FailedServers is not an object. ignoring for now"; diff --git a/arangod/Cluster/MaintenanceFeature.cpp b/arangod/Cluster/MaintenanceFeature.cpp index 1614e4cefa..906c7b1b7e 100644 --- a/arangod/Cluster/MaintenanceFeature.cpp +++ b/arangod/Cluster/MaintenanceFeature.cpp @@ -21,6 +21,8 @@ /// @author Matthew Von-Maszewski //////////////////////////////////////////////////////////////////////////////// +#include + #include "MaintenanceFeature.h" #include "ApplicationFeatures/ApplicationServer.h" @@ -431,7 +433,7 @@ std::shared_ptr MaintenanceFeature::findReadyAction(std::unordered_set +#include namespace arangodb { diff --git a/arangod/Graph/Graph.h b/arangod/Graph/Graph.h index b68fbee246..25bbb5f6f3 100644 --- a/arangod/Graph/Graph.h +++ b/arangod/Graph/Graph.h @@ -26,6 +26,7 @@ #include #include #include +#include #include "Aql/Query.h" #include "Aql/VariableGenerator.h" diff --git a/arangod/Graph/ShortestPathPriorityQueue.h b/arangod/Graph/ShortestPathPriorityQueue.h index bcd1b3c4b9..7c983b6934 100644 --- a/arangod/Graph/ShortestPathPriorityQueue.h +++ b/arangod/Graph/ShortestPathPriorityQueue.h @@ -25,6 +25,7 @@ #define ARANGODB_GRAPH_SHORTEST_PATH_PRIORITY_QUEUE_H 1 #include "Basics/Common.h" +#include namespace arangodb { namespace graph { diff --git a/arangod/Graph/ShortestPathResult.h b/arangod/Graph/ShortestPathResult.h index 73139f3bb9..1c39ea8cf9 100644 --- a/arangod/Graph/ShortestPathResult.h +++ b/arangod/Graph/ShortestPathResult.h @@ -27,6 +27,7 @@ #include "Basics/Common.h" #include "Graph/EdgeDocumentToken.h" #include +#include namespace arangodb { diff --git a/arangod/Graph/TraverserCache.h b/arangod/Graph/TraverserCache.h index 319a018294..bf3282c89e 100644 --- a/arangod/Graph/TraverserCache.h +++ b/arangod/Graph/TraverserCache.h @@ -25,6 +25,7 @@ #include "Basics/Common.h" #include +#include namespace arangodb { class ManagedDocumentResult; diff --git a/arangod/IResearch/IResearchRocksDBRecoveryHelper.h b/arangod/IResearch/IResearchRocksDBRecoveryHelper.h index 05c33e0a44..598be68e5e 100644 --- a/arangod/IResearch/IResearchRocksDBRecoveryHelper.h +++ b/arangod/IResearch/IResearchRocksDBRecoveryHelper.h @@ -28,6 +28,7 @@ #include "VocBase/voc-types.h" #include +#include struct TRI_vocbase_t; @@ -91,4 +92,4 @@ class IResearchRocksDBRecoveryHelper final : public RocksDBRecoveryHelper { } // end namespace iresearch } // end namespace arangodb -#endif \ No newline at end of file +#endif diff --git a/arangod/MMFiles/MMFilesFulltextIndex.h b/arangod/MMFiles/MMFilesFulltextIndex.h index afddc726b5..f9f4a27e53 100644 --- a/arangod/MMFiles/MMFilesFulltextIndex.h +++ b/arangod/MMFiles/MMFilesFulltextIndex.h @@ -24,7 +24,8 @@ #ifndef ARANGOD_MMFILES_FULLTEXT_INDEX_H #define ARANGOD_MMFILES_FULLTEXT_INDEX_H 1 -#include "Basics/Common.h" +#include + #include "Indexes/IndexIterator.h" #include "MMFiles/MMFilesIndex.h" #include "MMFiles/mmfiles-fulltext-common.h" @@ -72,7 +73,7 @@ class MMFilesFulltextIndex final : public MMFilesIndex { void load() override {} void unload() override; - std::unique_ptr iteratorForCondition(transaction::Methods* trx, + std::unique_ptr iteratorForCondition(transaction::Methods* trx, arangodb::aql::AstNode const* node, arangodb::aql::Variable const* reference, IndexIteratorOptions const& opts) override final; diff --git a/arangod/MMFiles/MMFilesSkiplistIndex.cpp b/arangod/MMFiles/MMFilesSkiplistIndex.cpp index 90f1aee2ac..1856ecce47 100644 --- a/arangod/MMFiles/MMFilesSkiplistIndex.cpp +++ b/arangod/MMFiles/MMFilesSkiplistIndex.cpp @@ -21,6 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// +#include + #include "MMFilesSkiplistIndex.h" #include "Aql/AstNode.h" #include "Aql/SortCondition.h" @@ -1137,7 +1139,7 @@ bool MMFilesSkiplistIndex::findMatchingConditions( } std::unique_ptr MMFilesSkiplistIndex::iteratorForCondition( - transaction::Methods* trx, + transaction::Methods* trx, arangodb::aql::AstNode const* node, arangodb::aql::Variable const* reference, IndexIteratorOptions const& opts) { TRI_ASSERT(!isSorted() || opts.sorted); diff --git a/arangod/MMFiles/mmfiles-fulltext-index.h b/arangod/MMFiles/mmfiles-fulltext-index.h index fac615ad2a..d8578c37dc 100644 --- a/arangod/MMFiles/mmfiles-fulltext-index.h +++ b/arangod/MMFiles/mmfiles-fulltext-index.h @@ -24,6 +24,8 @@ #ifndef ARANGOD_MMFILES_MMFILES_FULLTEXT_INDEX_H #define ARANGOD_MMFILES_MMFILES_FULLTEXT_INDEX_H 1 +#include + #include "VocBase/LocalDocumentId.h" #include "VocBase/voc-types.h" #include "mmfiles-fulltext-common.h" diff --git a/arangod/MMFiles/mmfiles-fulltext-list.h b/arangod/MMFiles/mmfiles-fulltext-list.h index 83427da4c2..f7305071b2 100644 --- a/arangod/MMFiles/mmfiles-fulltext-list.h +++ b/arangod/MMFiles/mmfiles-fulltext-list.h @@ -24,6 +24,8 @@ #ifndef ARANGOD_MMFILES_MMFILES_FULLTEXT_LIST_H #define ARANGOD_MMFILES_MMFILES_FULLTEXT_LIST_H 1 +#include + #include "VocBase/voc-types.h" #include "mmfiles-fulltext-common.h" diff --git a/arangod/Pregel/CommonFormats.h b/arangod/Pregel/CommonFormats.h index f9c22cdc17..322ef19d5e 100644 --- a/arangod/Pregel/CommonFormats.h +++ b/arangod/Pregel/CommonFormats.h @@ -27,6 +27,8 @@ #ifndef ARANGODB_PREGEL_COMMON_MFORMATS_H #define ARANGODB_PREGEL_COMMON_MFORMATS_H 1 +#include + #include "Pregel/Graph.h" #include "Pregel/GraphFormat.h" #include "Pregel/MessageFormat.h" diff --git a/arangod/Pregel/IncomingCache.h b/arangod/Pregel/IncomingCache.h index 7ab459a88a..3893aaa2ee 100644 --- a/arangod/Pregel/IncomingCache.h +++ b/arangod/Pregel/IncomingCache.h @@ -27,6 +27,7 @@ #include #include +#include #include "Basics/Common.h" #include "Basics/StringHeap.h" diff --git a/arangod/Pregel/Recovery.h b/arangod/Pregel/Recovery.h index c6f4a688a1..652e34ea81 100644 --- a/arangod/Pregel/Recovery.h +++ b/arangod/Pregel/Recovery.h @@ -23,6 +23,8 @@ #ifndef ARANGODB_PREGEL_RECOVERY_H #define ARANGODB_PREGEL_RECOVERY_H 1 +#include + #include #include //#include "Cluster/AgencyCallbackRegistry.h" diff --git a/arangod/Pregel/WorkerConfig.h b/arangod/Pregel/WorkerConfig.h index d9a6f7bcf1..f609e1c946 100644 --- a/arangod/Pregel/WorkerConfig.h +++ b/arangod/Pregel/WorkerConfig.h @@ -23,6 +23,9 @@ #ifndef ARANGODB_PREGEL_WORKER_CONFIG_H #define ARANGODB_PREGEL_WORKER_CONFIG_H 1 +#include +#include + #include #include #include "Basics/Common.h" @@ -57,7 +60,7 @@ class WorkerConfig { inline bool asynchronousMode() const { return _asynchronousMode; } inline bool lazyLoading() const { return _lazyLoading; } - + inline bool useMemoryMaps() const { return _useMemoryMaps; } inline uint64_t parallelism() const { return _parallelism; } @@ -88,7 +91,7 @@ class WorkerConfig { } return StaticStrings::Empty; } - + // same content on every worker, has to stay equal!!!! inline std::vector const& globalShardIDs() const { return _globalShardIDs; @@ -146,7 +149,7 @@ class WorkerConfig { std::unordered_map _collectionPlanIdMap; std::map _shardToCollectionName; - + // Map from edge collection to their shards, only iterated over keep sorted std::map> _vertexCollectionShards, _edgeCollectionShards; diff --git a/arangod/Replication/ReplicationApplierConfiguration.h b/arangod/Replication/ReplicationApplierConfiguration.h index 0a9875208c..e62c0e4f3f 100644 --- a/arangod/Replication/ReplicationApplierConfiguration.h +++ b/arangod/Replication/ReplicationApplierConfiguration.h @@ -25,6 +25,7 @@ #define ARANGOD_REPLICATION_REPLICATION_APPLIER_CONFIGURATION_H 1 #include "Basics/Common.h" +#include namespace arangodb { namespace velocypack { diff --git a/arangod/Replication/utilities.h b/arangod/Replication/utilities.h index ed92c95d90..64e3c7e2d4 100644 --- a/arangod/Replication/utilities.h +++ b/arangod/Replication/utilities.h @@ -25,6 +25,7 @@ #ifndef ARANGOD_REPLICATION_UTILITIES_H #define ARANGOD_REPLICATION_UTILITIES_H 1 +#include #include #include #include diff --git a/arangod/RocksDBEngine/RocksDBCollectionMeta.h b/arangod/RocksDBEngine/RocksDBCollectionMeta.h index 0f56b7919a..a7deafc538 100644 --- a/arangod/RocksDBEngine/RocksDBCollectionMeta.h +++ b/arangod/RocksDBEngine/RocksDBCollectionMeta.h @@ -28,6 +28,8 @@ #include "VocBase/voc-types.h" #include +#include +#include #include @@ -112,10 +114,10 @@ struct RocksDBCollectionMeta final { /// @brief deserialize collection metadata, only called on startup arangodb::Result deserializeMeta(rocksdb::DB*, LogicalCollection&); - + public: // static helper methods to modify collection meta entries in rocksdb - + /// @brief load collection document count static DocCount loadCollectionCount(rocksdb::DB*, uint64_t objectId); diff --git a/arangod/RocksDBEngine/RocksDBCuckooIndexEstimator.h b/arangod/RocksDBEngine/RocksDBCuckooIndexEstimator.h index 016be1a154..a765e56416 100644 --- a/arangod/RocksDBEngine/RocksDBCuckooIndexEstimator.h +++ b/arangod/RocksDBEngine/RocksDBCuckooIndexEstimator.h @@ -24,7 +24,9 @@ #ifndef ARANGOD_ROCKSDB_ROCKSDB_INDEX_ESTIMATOR_H #define ARANGOD_ROCKSDB_ROCKSDB_INDEX_ESTIMATOR_H 1 -#include "Basics/Common.h" +#include +#include + #include "Basics/Exceptions.h" #include "Basics/ReadLocker.h" #include "Basics/ReadWriteLock.h" @@ -521,7 +523,7 @@ class RocksDBCuckooIndexEstimator { Result res = basics::catchVoidToResult([&]() -> void { std::vector inserts; std::vector removals; - + // truncate will increase this sequence rocksdb::SequenceNumber ignoreSeq = 0; while (true) { @@ -529,7 +531,7 @@ class RocksDBCuckooIndexEstimator { // find out if we have buffers to apply { WRITE_LOCKER(locker, _lock); - + { // check for a truncate marker auto it = _truncateBuffer.begin(); // sorted ASC @@ -542,7 +544,7 @@ class RocksDBCuckooIndexEstimator { } } TRI_ASSERT(ignoreSeq <= commitSeq); - + // check for inserts auto it = _insertBuffers.begin(); // sorted ASC while (it != _insertBuffers.end() && it->first <= commitSeq) { @@ -555,10 +557,10 @@ class RocksDBCuckooIndexEstimator { TRI_ASSERT(!inserts.empty()); appliedSeq = std::max(appliedSeq, it->first); _insertBuffers.erase(it); - + break; } - + // check for removals it = _removalBuffers.begin(); // sorted ASC while (it != _removalBuffers.end() && it->first <= commitSeq) { @@ -574,22 +576,22 @@ class RocksDBCuckooIndexEstimator { break; } } - + if (foundTruncate) { clear(); // clear estimates } - + // no inserts or removals left to apply, drop out of loop if (inserts.empty() && removals.empty()) { break; } - + // apply inserts for (auto const& key : inserts) { insert(key); } inserts.clear(); - + // apply removals for (auto const& key : removals) { remove(key); diff --git a/arangod/Sharding/ShardingInfo.h b/arangod/Sharding/ShardingInfo.h index 110d3d6567..25837bdd4e 100644 --- a/arangod/Sharding/ShardingInfo.h +++ b/arangod/Sharding/ShardingInfo.h @@ -24,8 +24,7 @@ #ifndef ARANGOD_CLUSTER_SHARDING_INFO_H #define ARANGOD_CLUSTER_SHARDING_INFO_H 1 -#include "Basics/Common.h" - +#include #include #include diff --git a/arangod/StorageEngine/TransactionState.h b/arangod/StorageEngine/TransactionState.h index 5f87174875..6aae5b133a 100644 --- a/arangod/StorageEngine/TransactionState.h +++ b/arangod/StorageEngine/TransactionState.h @@ -35,6 +35,8 @@ #include "VocBase/AccessMode.h" #include "VocBase/voc-types.h" +#include + #ifdef ARANGODB_ENABLE_MAINTAINER_MODE #define LOG_TRX(logid, llevel, trx, tlevel) \ @@ -186,7 +188,7 @@ class TransactionState { /// @brief make a exclusive transaction, only valid before begin void setExclusiveAccessType(); - + /// @brief whether or not a transaction is read-only bool isReadOnlyTransaction() const { return (_type == AccessMode::Type::READ); @@ -194,7 +196,7 @@ class TransactionState { /// @brief whether or not a transaction only has exculsive or read accesses bool isOnlyExclusiveTransaction() const; - + /// @brief servers already contacted arangodb::HashSet const& knownServers() const { return _knownServers; @@ -203,17 +205,17 @@ class TransactionState { bool knowsServer(std::string const& uuid) const { return _knownServers.find(uuid) != _knownServers.end(); } - + /// @brief add a server to the known set void addKnownServer(std::string const& uuid) { _knownServers.emplace(uuid); } - + /// @brief remove a server from the known set void removeKnownServer(std::string const& uuid) { _knownServers.erase(uuid); } - + void clearKnownServers() { _knownServers.clear(); } @@ -233,7 +235,7 @@ class TransactionState { /// @brief check if current user can access this collection Result checkCollectionPermission(std::string const& cname, AccessMode::Type) const; - + protected: TRI_vocbase_t& _vocbase; /// @brief vocbase for this transaction TRI_voc_tid_t const _id; /// @brief local trx id @@ -255,13 +257,13 @@ class TransactionState { private: /// a collection of stored cookies std::map _cookies; - + /// @brief servers we already talked to for this transactions arangodb::HashSet _knownServers; - + /// @brief reference counter of # of 'Methods' instances using this object std::atomic _nestingLevel; - + bool _registeredTransaction; }; diff --git a/arangod/StorageEngine/WalAccess.h b/arangod/StorageEngine/WalAccess.h index 0b6a604f6f..2a46a72744 100644 --- a/arangod/StorageEngine/WalAccess.h +++ b/arangod/StorageEngine/WalAccess.h @@ -24,6 +24,8 @@ #ifndef ARANGOD_STORAGE_ENGINE_WAL_ACCESS_H #define ARANGOD_STORAGE_ENGINE_WAL_ACCESS_H 1 +#include + #include "Basics/Result.h" #include "Utils/CollectionGuard.h" #include "Utils/DatabaseGuard.h" @@ -109,7 +111,7 @@ class WalAccess { /// In case collection is == 0, bool includeSystem = false; - + /// export _queues and _jobs collection bool includeFoxxQueues = false; diff --git a/arangod/Utils/CollectionExport.h b/arangod/Utils/CollectionExport.h index d947d8f7ac..da53534f81 100644 --- a/arangod/Utils/CollectionExport.h +++ b/arangod/Utils/CollectionExport.h @@ -24,6 +24,7 @@ #ifndef ARANGOD_COLLECTION_EXPORT_H #define ARANGOD_COLLECTION_EXPORT_H 1 +#include #include "Basics/Common.h" namespace arangodb { diff --git a/arangod/VocBase/voc-types.h b/arangod/VocBase/voc-types.h index 8bfeca4e31..81bbce06e2 100644 --- a/arangod/VocBase/voc-types.h +++ b/arangod/VocBase/voc-types.h @@ -29,6 +29,8 @@ #include #include +#include + /// @brief tick type (56bit) typedef uint64_t TRI_voc_tick_t; diff --git a/lib/ApplicationFeatures/ApplicationFeature.h b/lib/ApplicationFeatures/ApplicationFeature.h index b7761d9d11..974ce633d5 100644 --- a/lib/ApplicationFeatures/ApplicationFeature.h +++ b/lib/ApplicationFeatures/ApplicationFeature.h @@ -28,6 +28,8 @@ #include "ApplicationFeatures/ApplicationServer.h" #include "Basics/Exceptions.h" +#include + namespace arangodb { namespace application_features { @@ -220,4 +222,4 @@ class ApplicationFeature { } // namespace application_features } // namespace arangodb -#endif \ No newline at end of file +#endif diff --git a/lib/Basics/Common.h b/lib/Basics/Common.h index ae65582cda..9b05f1cac7 100644 --- a/lib/Basics/Common.h +++ b/lib/Basics/Common.h @@ -47,14 +47,10 @@ #include #include #include -#include #include -#include #include -#include #include #include -#include #include #define TRI_WITHIN_COMMON 1 diff --git a/lib/Basics/DeadlockDetector.h b/lib/Basics/DeadlockDetector.h index f576254afc..ec80979024 100644 --- a/lib/Basics/DeadlockDetector.h +++ b/lib/Basics/DeadlockDetector.h @@ -27,6 +27,7 @@ #include "Basics/Common.h" #include "Basics/Mutex.h" #include "Basics/MutexLocker.h" +#include namespace arangodb { namespace basics { diff --git a/lib/Basics/Utf8Helper.h b/lib/Basics/Utf8Helper.h index 0d6467a86e..e6de187293 100644 --- a/lib/Basics/Utf8Helper.h +++ b/lib/Basics/Utf8Helper.h @@ -25,6 +25,7 @@ #ifndef ARANGODB_BASICS_UTF8HELPER_H #define ARANGODB_BASICS_UTF8HELPER_H 1 +#include #include "Basics/Common.h" #include diff --git a/lib/Basics/debugging.cpp b/lib/Basics/debugging.cpp index c559c7c490..0598ca5128 100644 --- a/lib/Basics/debugging.cpp +++ b/lib/Basics/debugging.cpp @@ -29,6 +29,7 @@ #include "Logger/Logger.h" #include +#include #ifdef ARANGODB_ENABLE_MAINTAINER_MODE #if ARANGODB_ENABLE_BACKTRACE diff --git a/lib/Endpoint/EndpointList.h b/lib/Endpoint/EndpointList.h index 85816cbf92..edf2205f29 100644 --- a/lib/Endpoint/EndpointList.h +++ b/lib/Endpoint/EndpointList.h @@ -27,6 +27,7 @@ #include "Basics/Common.h" #include "Endpoint/Endpoint.h" +#include namespace arangodb { class EndpointList { diff --git a/lib/Geo/GeoUtils.cpp b/lib/Geo/GeoUtils.cpp index 10b27ccbf2..fb1bee87c6 100644 --- a/lib/Geo/GeoUtils.cpp +++ b/lib/Geo/GeoUtils.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/lib/Logger/LogAppender.h b/lib/Logger/LogAppender.h index 730cc126bd..5a92f5e4b6 100644 --- a/lib/Logger/LogAppender.h +++ b/lib/Logger/LogAppender.h @@ -29,6 +29,8 @@ #include "Basics/Mutex.h" #include "Logger/LogLevel.h" +#include + namespace arangodb { class LogTopic; struct LogMessage; diff --git a/lib/Logger/LogTimeFormat.h b/lib/Logger/LogTimeFormat.h index 15d9f328c1..22aeecbca4 100644 --- a/lib/Logger/LogTimeFormat.h +++ b/lib/Logger/LogTimeFormat.h @@ -27,6 +27,7 @@ #include "Basics/Common.h" #include +#include namespace arangodb { namespace LogTimeFormats { diff --git a/lib/Logger/LogTopic.cpp b/lib/Logger/LogTopic.cpp index cce7078484..c1ea3b7475 100644 --- a/lib/Logger/LogTopic.cpp +++ b/lib/Logger/LogTopic.cpp @@ -25,6 +25,7 @@ #include "Basics/MutexLocker.h" #include "Logger/Logger.h" +#include #ifdef USE_ENTERPRISE #include "Enterprise/Audit/AuditFeature.h" diff --git a/lib/Maskings/Maskings.h b/lib/Maskings/Maskings.h index 400c1bfc03..d3f4f8ee4c 100644 --- a/lib/Maskings/Maskings.h +++ b/lib/Maskings/Maskings.h @@ -23,6 +23,8 @@ #ifndef ARANGODB_MASKINGS_MASKINGS_H #define ARANGODB_MASKINGS_MASKINGS_H 1 +#include + #include "Basics/Common.h" #include diff --git a/lib/ProgramOptions/IniFileParser.h b/lib/ProgramOptions/IniFileParser.h index 7eaf4d77a0..30c11b4819 100644 --- a/lib/ProgramOptions/IniFileParser.h +++ b/lib/ProgramOptions/IniFileParser.h @@ -24,6 +24,8 @@ #define ARANGODB_PROGRAM_OPTIONS_INI_FILE_PARSER_H 1 #include +#include +#include #include "ProgramOptions/ProgramOptions.h" @@ -37,8 +39,8 @@ class IniFileParser { // parse a config file. returns true if all is well, false otherwise // errors that occur during parse are reported to _options bool parse(std::string const& filename, bool endPassAfterwards); - - // parse a config file, with the contents already read into . + + // parse a config file, with the contents already read into . // returns true if all is well, false otherwise // errors that occur during parse are reported to _options bool parseContent(std::string const& filename, std::string const& buf, bool endPassAfterwards); diff --git a/lib/ProgramOptions/Parameters.h b/lib/ProgramOptions/Parameters.h index ba477268f3..b36c13428f 100644 --- a/lib/ProgramOptions/Parameters.h +++ b/lib/ProgramOptions/Parameters.h @@ -35,6 +35,7 @@ #include #include #include +#include namespace arangodb { namespace options { @@ -104,7 +105,7 @@ inline T toNumber(std::string value, T base) { value = value.substr(0, n - 1); } } - + char const* p = value.data(); char const* e = p + value.size(); // skip leading whitespace diff --git a/lib/ProgramOptions/Section.h b/lib/ProgramOptions/Section.h index 879087f1a1..29bcd69d8c 100644 --- a/lib/ProgramOptions/Section.h +++ b/lib/ProgramOptions/Section.h @@ -26,6 +26,8 @@ #include "Basics/Common.h" #include "ProgramOptions/Option.h" +#include + namespace arangodb { namespace options { diff --git a/lib/Rest/Version.h b/lib/Rest/Version.h index ba1f4cf840..7030b8ddc9 100644 --- a/lib/Rest/Version.h +++ b/lib/Rest/Version.h @@ -24,6 +24,8 @@ #ifndef ARANGODB_REST_VERSION_H #define ARANGODB_REST_VERSION_H 1 +#include + #include "Basics/Common.h" #include "Basics/build.h" diff --git a/lib/Ssl/ssl-helper.h b/lib/Ssl/ssl-helper.h index 339f59c119..3b357d36d3 100644 --- a/lib/Ssl/ssl-helper.h +++ b/lib/Ssl/ssl-helper.h @@ -30,6 +30,7 @@ #include #include "Basics/asio_ns.h" +#include namespace arangodb { // SSL protocol methods diff --git a/lib/Utilities/ScriptLoader.h b/lib/Utilities/ScriptLoader.h index 3f29868570..ec87ef096f 100644 --- a/lib/Utilities/ScriptLoader.h +++ b/lib/Utilities/ScriptLoader.h @@ -24,9 +24,11 @@ #ifndef ARANGODB_UTILITIES_SCRIPT_LOADER_H #define ARANGODB_UTILITIES_SCRIPT_LOADER_H 1 +#include #include "Basics/Common.h" #include "Basics/Mutex.h" + namespace arangodb { //////////////////////////////////////////////////////////////////////////////// diff --git a/tests/Geo/NearUtilsTest.cpp b/tests/Geo/NearUtilsTest.cpp index 928aae5da2..b41b76126c 100644 --- a/tests/Geo/NearUtilsTest.cpp +++ b/tests/Geo/NearUtilsTest.cpp @@ -22,7 +22,8 @@ #include "gtest/gtest.h" -#include "Basics/Common.h" +#include + #include "Basics/StringUtils.h" #include "Geo/GeoJson.h" #include "Geo/GeoUtils.h" diff --git a/tests/IResearch/AgencyCommManagerMock.h b/tests/IResearch/AgencyCommManagerMock.h index 273dc45734..67422c5c04 100644 --- a/tests/IResearch/AgencyCommManagerMock.h +++ b/tests/IResearch/AgencyCommManagerMock.h @@ -24,8 +24,8 @@ #ifndef ARANGODB_IRESEARCH__IRESEARCH_AGENCY_COMM_MANAGER_MOCK_H #define ARANGODB_IRESEARCH__IRESEARCH_AGENCY_COMM_MANAGER_MOCK_H 1 +#include #include "utils/file_utils.hpp" - #include "Agency/AgencyComm.h" //////////////////////////////////////////////////////////////////////////////// @@ -123,4 +123,4 @@ class GeneralClientConnectionMapMock: public GeneralClientConnectionMock { virtual void response(arangodb::basics::StringBuffer& buffer) override; }; -#endif \ No newline at end of file +#endif diff --git a/tests/IResearch/VelocyPackHelper-test.cpp b/tests/IResearch/VelocyPackHelper-test.cpp index 45efd13ffa..a2f253aee6 100644 --- a/tests/IResearch/VelocyPackHelper-test.cpp +++ b/tests/IResearch/VelocyPackHelper-test.cpp @@ -22,6 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "gtest/gtest.h" +#include #include "IResearch/VelocyPackHelper.h" diff --git a/tests/Mocks/StorageEngineMock.h b/tests/Mocks/StorageEngineMock.h index 2b361c15d6..6b410f870f 100644 --- a/tests/Mocks/StorageEngineMock.h +++ b/tests/Mocks/StorageEngineMock.h @@ -21,9 +21,11 @@ /// @author Vasiliy Nabatchikov //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGODB_TESTS_MOCKS_STORAGE_ENGINE_MOCK_H +#ifndef ARANGODB_TESTS_MOCKS_STORAGE_ENGINE_MOCK_H #define ARANGODB_TESTS_MOCKS_STORAGE_ENGINE_MOCK_H 1 +#include + #include "Basics/Result.h" #include "Indexes/IndexIterator.h" #include "StorageEngine/StorageEngine.h"