Clean up includes in actor header files (#7331)

* Remove unnecessary actorcompiler.h includes (from non-actor files)

* Make AsyncFileChaos a non-actor header file

* Add unactorcompiler.h include to the end of actor header files

* Add missing actorcompiler.h includes to actor header files
This commit is contained in:
Trevor Clinkenbeard 2022-06-13 13:26:51 -07:00 committed by GitHub
parent a5d91fe18a
commit 942d687506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 27 additions and 18 deletions

View File

@ -23,7 +23,6 @@
#define FDBCLIENT_CLUSTERCONNECTIONFILE_H
#include "fdbclient/CoordinationInterface.h"
#include "flow/actorcompiler.h" // has to be last include
// An implementation of IClusterConnectionRecord backed by a file.
class ClusterConnectionFile : public IClusterConnectionRecord, ReferenceCounted<ClusterConnectionFile>, NonCopyable {
@ -72,5 +71,4 @@ private:
std::string filename;
};
#include "flow/unactorcompiler.h"
#endif
#endif

View File

@ -179,4 +179,6 @@ private:
std::unordered_map<KeyRef, std::function<void(std::optional<std::any>)>> callbacks;
};
#include "flow/unactorcompiler.h"
#endif

View File

@ -1,5 +1,5 @@
/*
* AsyncFileChaos.actor.h
* AsyncFileChaos.h
*
* This source file is part of the FoundationDB open source project
*
@ -18,13 +18,13 @@
* limitations under the License.
*/
#pragma once
#include "flow/flow.h"
#include "flow/serialize.h"
#include "flow/genericactors.actor.h"
#include "fdbrpc/IAsyncFile.h"
#include "flow/network.h"
#include "flow/ActorCollection.h"
#include "flow/actorcompiler.h"
// template <class AsyncFileType>
class AsyncFileChaos final : public IAsyncFile, public ReferenceCounted<AsyncFileChaos> {

View File

@ -1,5 +1,6 @@
set(FDBRPC_SRCS
AsyncFileCached.actor.h
AsyncFileChaos.h
AsyncFileEIO.actor.h
AsyncFileEncrypted.h
AsyncFileKAIO.actor.h

View File

@ -30,7 +30,7 @@
#define FILESYSTEM_IMPL 1
#include "fdbrpc/AsyncFileCached.actor.h"
#include "fdbrpc/AsyncFileChaos.actor.h"
#include "fdbrpc/AsyncFileChaos.h"
#include "fdbrpc/AsyncFileEIO.actor.h"
#include "fdbrpc/AsyncFileEncrypted.h"
#include "fdbrpc/AsyncFileWinASIO.actor.h"

View File

@ -39,7 +39,7 @@
#include "fdbrpc/AsyncFileCached.actor.h"
#include "fdbrpc/AsyncFileEncrypted.h"
#include "fdbrpc/AsyncFileNonDurable.actor.h"
#include "fdbrpc/AsyncFileChaos.actor.h"
#include "fdbrpc/AsyncFileChaos.h"
#include "flow/crc32c.h"
#include "fdbrpc/TraceFileIO.h"
#include "flow/FaultInjection.h"

View File

@ -123,4 +123,6 @@ private:
Future<Void> collection;
};
#include "flow/unactorcompiler.h"
#endif

View File

@ -51,4 +51,6 @@ bool compareFDBAndBlob(RangeResult fdb,
Version v,
bool debug);
#endif
#include "flow/unactorcompiler.h"
#endif

View File

@ -47,7 +47,6 @@
#include "flow/BooleanParam.h"
#include "flow/Trace.h"
#include "flow/UnitTest.h"
#include "flow/actorcompiler.h" // This must be the last #include.
class TCTeamInfo;
class TCMachineInfo;

View File

@ -26,7 +26,6 @@
#include "fdbclient/DatabaseContext.h" // for clone()
#include "fdbserver/TesterInterface.actor.h"
#include "fdbserver/WorkerInterface.actor.h"
#include "flow/actorcompiler.h"
Future<int64_t> getDataInFlight(Database const& cx, Reference<AsyncVar<struct ServerDBInfo> const> const&);
Future<std::pair<int64_t, int64_t>> getTLogQueueInfo(Database const& cx,
@ -54,5 +53,4 @@ getStorageWorkers(Database const& cx, Reference<AsyncVar<ServerDBInfo> const> co
Future<std::vector<WorkerInterface>> getCoordWorkers(Database const& cx,
Reference<AsyncVar<ServerDBInfo> const> const& dbInfo);
#include "flow/unactorcompiler.h"
#endif

View File

@ -33,6 +33,7 @@
#include "flow/Arena.h"
#include "flow/IRandom.h"
#include "flow/genericactors.actor.h"
#include "flow/actorcompiler.h" // must be last include
struct ResolutionBalancer {
AsyncVar<Standalone<VectorRef<ResolverMoveRef>>> resolverChanges;

View File

@ -40,6 +40,8 @@
#include "fdbserver/RestoreApplier.actor.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
#include "flow/actorcompiler.h" // must be last include
// Each restore worker (a process) is assigned for a role.
// MAYBE Later: We will support multiple restore roles on a worker
struct RestoreWorkerData : NonCopyable, public ReferenceCounted<RestoreWorkerData> {

View File

@ -260,4 +260,7 @@ ICheckpointReader* newRocksDBCheckpointReader(const CheckpointMetaData& checkpoi
RocksDBColumnFamilyCheckpoint getRocksCF(const CheckpointMetaData& checkpoint);
RocksDBCheckpoint getRocksCheckpoint(const CheckpointMetaData& checkpoint);
#endif
#include "flow/unactorcompiler.h"
#endif

View File

@ -64,4 +64,6 @@ Future<decltype(std::declval<Fun>()())> runInRole(Fun fun, ProcessClass::Cluster
return res;
}
#include "flow/unactorcompiler.h"
#endif

View File

@ -69,4 +69,7 @@ ACTOR Future<std::vector<CheckpointMetaData>> fetchCheckpoints(
std::vector<CheckpointMetaData> initialStates,
std::string dir,
std::function<Future<Void>(const CheckpointMetaData&)> cFun = nullptr);
#endif
#include "flow/unactorcompiler.h"
#endif

View File

@ -27,7 +27,6 @@
#include "fdbclient/ReadYourWrites.h"
#include "fdbclient/ThreadSafeTransaction.h"
#include "fdbserver/workloads/MemoryKeyValueStore.h"
#include "flow/actorcompiler.h"
// an enumeration of apis being tested
enum TransactionType { NATIVE, READ_YOUR_WRITES, THREAD_SAFE, MULTI_VERSION };
@ -399,6 +398,4 @@ struct ApiWorkload : TestWorkload {
TransactionType transactionType;
};
#include "flow/unactorcompiler.h"
#endif

View File

@ -21,7 +21,6 @@
#include "fdbserver/workloads/workloads.actor.h"
#include "flow/ActorCollection.h"
#include "fdbserver/workloads/AsyncFile.actor.h"
#include "flow/actorcompiler.h"
// class RandomByteGenerator