Fix OPEN_FOR_IDE build

This commit is contained in:
Andrew Noyes 2019-09-25 23:19:42 -07:00
parent ec0789f2e7
commit d4de608bb6
23 changed files with 43 additions and 56 deletions

View File

@ -3948,7 +3948,7 @@ ACTOR static Future<Version> _fastRestore(Database cx, Key tagName, Key url, boo
ACTOR Future<Version> fastRestore(Database cx, Standalone<StringRef> tagName, Standalone<StringRef> url,
bool waitForComplete, long targetVersion, bool verbose, Standalone<KeyRangeRef> range,
Standalone<StringRef> addPrefix, Standalone<StringRef> removePrefix) {
Version targetVersion =
Version result =
wait(_fastRestore(cx, tagName, url, waitForComplete, targetVersion, verbose, range, addPrefix, removePrefix));
return targetVersion;
}
return result;
}

View File

@ -3502,7 +3502,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
printf("Data distribution is turned off.\n");
} else if (tokencmp(tokens[1], "disable")) {
if (tokencmp(tokens[2], "ssfailure")) {
bool _ = wait(makeInterruptable(setHealthyZone(db, ignoreSSFailuresZoneString, 0)));
wait(success(makeInterruptable(setHealthyZone(db, ignoreSSFailuresZoneString, 0))));
printf("Data distribution is disabled for storage server failures.\n");
} else if (tokencmp(tokens[2], "rebalance")) {
wait(makeInterruptable(setDDIgnoreRebalanceSwitch(db, true)));
@ -3514,7 +3514,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
}
} else if (tokencmp(tokens[1], "enable")) {
if (tokencmp(tokens[2], "ssfailure")) {
bool _ = wait(makeInterruptable(clearHealthyZone(db, false, true)));
wait(success(makeInterruptable(clearHealthyZone(db, false, true))));
printf("Data distribution is enabled for storage server failures.\n");
} else if (tokencmp(tokens[2], "rebalance")) {
wait(makeInterruptable(setDDIgnoreRebalanceSwitch(db, false)));

View File

@ -26,7 +26,7 @@
#include "fdbclient/FDBTypes.h"
#include "fdbclient/StorageServerInterface.h"
#include "fdbserver/RestoreWorkerInterface.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
struct RestoreLoaderInterface;
struct RestoreApplierInterface;

View File

@ -76,7 +76,7 @@ set(FDBSERVER_SRCS
RestoreLoader.actor.cpp
RestoreWorker.actor.h
RestoreWorker.actor.cpp
RestoreWorkerInterface.h
RestoreWorkerInterface.actor.h
Resolver.actor.cpp
ResolverInterface.h
ServerDBInfo.h

View File

@ -4986,7 +4986,6 @@ TEST_CASE("/DataDistribution/AddTeamsBestOf/NotEnoughServers") {
state int desiredTeams = SERVER_KNOBS->DESIRED_TEAMS_PER_SERVER * processSize;
state int maxTeams = SERVER_KNOBS->MAX_TEAMS_PER_SERVER * processSize;
state int teamSize = 3;
state int targetTeamsPerServer = SERVER_KNOBS->DESIRED_TEAMS_PER_SERVER * (teamSize + 1) / 2;
state DDTeamCollection* collection = testTeamCollection(teamSize, policy, processSize);
collection->addTeam(std::set<UID>({ UID(1, 0), UID(2, 0), UID(3, 0) }), true);

View File

@ -142,7 +142,7 @@ ACTOR Future<int> spawnProcess(std::string binPath, std::vector<std::string> par
#endif
ACTOR Future<int> execHelper(ExecCmdValueString* execArg, UID snapUID, std::string folder, std::string role) {
state Standalone<StringRef> uidStr = snapUID.toString();
state Standalone<StringRef> uidStr = Standalone<StringRef>(snapUID.toString());
state int err = 0;
state Future<int> cmdErr;
state double maxWaitTime = SERVER_KNOBS->SNAP_CREATE_MAX_TIMEOUT;

View File

@ -354,7 +354,7 @@ void writePage(IPager *pager, Reference<IPage> page, LogicalPageID pageID, Versi
ACTOR Future<Void> commit(IPager *pager) {
static int commitNum = 1;
state int myCommit = commitNum++;
state [[maybe_unused]] int myCommit = commitNum++;
debug_printf("Commit%d\n", myCommit);
wait(pager->commit());
@ -364,7 +364,7 @@ ACTOR Future<Void> commit(IPager *pager) {
ACTOR Future<Void> read(IPager *pager, LogicalPageID pageID, Version version, Version expectedVersion=-1) {
static int readNum = 1;
state int myRead = readNum++;
state [[maybe_unused]] int myRead = readNum++;
state Reference<IPagerSnapshot> readSnapshot = pager->getReadSnapshot(version);
debug_printf("Read%d\n", myRead);
Reference<const IPage> readPage = wait(readSnapshot->getPhysicalPage(pageID, true));

View File

@ -34,7 +34,7 @@
#include "fdbrpc/fdbrpc.h"
#include "fdbrpc/Locality.h"
#include "fdbserver/CoordinationInterface.h"
#include "fdbserver/RestoreWorkerInterface.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
#include "fdbserver/RestoreUtil.h"
#include "fdbserver/RestoreRoleCommon.actor.h"
@ -128,4 +128,4 @@ struct RestoreApplierData : RestoreRoleData, public ReferenceCounted<RestoreAppl
ACTOR Future<Void> restoreApplierCore(RestoreApplierInterface applierInterf, int nodeIndex, Database cx);
#include "flow/unactorcompiler.h"
#endif
#endif

View File

@ -32,6 +32,7 @@
#include "fdbclient/ManagementAPI.actor.h"
#include "fdbclient/MutationList.h"
#include "fdbclient/BackupContainer.h"
#include "flow/actorcompiler.h" // This must be the last #include.
// Split RestoreConfigFR defined in FileBackupAgent.actor.cpp to declaration in Restore.actor.h and implementation in
// RestoreCommon.actor.cpp
@ -268,7 +269,6 @@ ACTOR Future<std::string> RestoreConfigFR::getFullStatus_impl(Reference<RestoreC
state Future<std::string> progress = restore->getProgress(tr);
// restore might no longer be valid after the first wait so make sure it is not needed anymore.
state UID uid = restore->getUid();
wait(success(ranges) && success(addPrefix) && success(removePrefix) &&
success(url) && success(restoreVersion) && success(progress));
@ -433,4 +433,4 @@ ACTOR Future<Standalone<VectorRef<KeyValueRef>>> decodeLogFileBlock(Reference<IA
}
}
} // namespace parallelFileRestore
} // namespace parallelFileRestore

View File

@ -34,7 +34,7 @@
#include "fdbrpc/fdbrpc.h"
#include "fdbserver/CoordinationInterface.h"
#include "fdbrpc/Locality.h"
#include "fdbserver/RestoreWorkerInterface.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
#include "fdbserver/RestoreUtil.h"
#include "fdbserver/RestoreCommon.actor.h"
#include "fdbserver/RestoreRoleCommon.actor.h"
@ -104,4 +104,4 @@ struct RestoreLoaderData : RestoreRoleData, public ReferenceCounted<RestoreLoade
ACTOR Future<Void> restoreLoaderCore(RestoreLoaderInterface loaderInterf, int nodeIndex, Database cx);
#include "flow/unactorcompiler.h"
#endif
#endif

View File

@ -193,7 +193,7 @@ ACTOR Future<Void> startProcessRestoreRequests(Reference<RestoreMasterData> self
for (restoreIndex = 0; restoreIndex < restoreRequests.size(); restoreIndex++) {
RestoreRequest& request = restoreRequests[restoreIndex];
TraceEvent("FastRestore").detail("RestoreRequestInfo", request.toString());
Version ver = wait(processRestoreRequest(self, cx, request));
wait(success(processRestoreRequest(self, cx, request)));
}
} catch (Error& e) {
TraceEvent(SevError, "FastRestoreFailed").detail("RestoreRequest", restoreRequests[restoreIndex].toString());
@ -514,4 +514,4 @@ ACTOR static Future<Void> notifyRestoreCompleted(Reference<RestoreMasterData> se
TraceEvent("FastRestore").detail("RestoreMaster", "RestoreCompleted");
return Void();
}
}

View File

@ -35,7 +35,7 @@
#include "fdbrpc/fdbrpc.h"
#include "fdbrpc/Locality.h"
#include "fdbserver/CoordinationInterface.h"
#include "fdbserver/RestoreWorkerInterface.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
#include "fdbserver/RestoreUtil.h"
#include "flow/actorcompiler.h" // has to be last include
@ -135,4 +135,4 @@ public:
};
#include "flow/unactorcompiler.h"
#endif
#endif

View File

@ -34,7 +34,7 @@
#include <cstdint>
#include <cstdarg>
#include "fdbserver/RestoreWorkerInterface.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
#include "fdbserver/RestoreUtil.h"
#include "fdbserver/RestoreCommon.actor.h"
#include "fdbserver/RestoreRoleCommon.actor.h"
@ -70,4 +70,4 @@ struct RestoreWorkerData : NonCopyable, public ReferenceCounted<RestoreWorkerDa
};
#include "flow/unactorcompiler.h"
#endif //FDBSERVER_RESTOREWORKER_H
#endif // FDBSERVER_RESTOREWORKER_H

View File

@ -1,5 +1,5 @@
/*
* RestoreWorkerInterface.h
* RestoreWorkerInterface.actor.h
*
* This source file is part of the FoundationDB open source project
*
@ -22,8 +22,11 @@
// which are RestoreMaster, RestoreLoader, and RestoreApplier
#pragma once
#ifndef FDBSERVER_RESTORE_WORKER_INTERFACE_H
#define FDBSERVER_RESTORE_WORKER_INTERFACE_H
#if defined(NO_INTELLISENSE) && !defined(FDBSERVER_RESTORE_WORKER_INTERFACE_ACTOR_H)
#define FDBSERVER_RESTORE_WORKER_INTERFACE_ACTOR_H
#include "fdbserver/RestoreWorkerInterface.actor.g.h"
#elif !defined(FDBSERVER_RESTORE_WORKER_INTERFACE_ACTOR_H)
#define FDBSERVER_RESTORE_WORKER_INTERFACE_ACTOR_H
#include <sstream>
#include "flow/Stats.h"
@ -35,6 +38,7 @@
#include "fdbserver/CoordinationInterface.h"
#include "fdbserver/Knobs.h"
#include "fdbserver/RestoreUtil.h"
#include "flow/actorcompiler.h" // This must be the last #include.
class RestoreConfigFR;
@ -467,7 +471,8 @@ struct RestoreRequest {
std::string getRoleStr(RestoreRole role);
////--- Interface functions
Future<Void> _restoreWorker(Database const& cx, LocalityData const& locality);
Future<Void> restoreWorker(Reference<ClusterConnectionFile> const& ccf, LocalityData const& locality);
ACTOR Future<Void> _restoreWorker(Database cx, LocalityData locality);
ACTOR Future<Void> restoreWorker(Reference<ClusterConnectionFile> ccf, LocalityData locality);
#endif
#include "flow/unactorcompiler.h"
#endif

View File

@ -1395,8 +1395,6 @@ ACTOR void setupAndRun(std::string dataFolder, const char *testFile, bool reboot
state int extraDB = 0;
state int minimumReplication = 0;
state int minimumRegions = 0;
state float timeout = 5400; // old default is 5400 seconds
state float buggify_timeout = 36000.0; // old default is 36000 seconds
checkExtraDB(testFile, extraDB, minimumReplication, minimumRegions);
// TODO (IPv6) Use IPv6?

View File

@ -34,7 +34,7 @@
#include "fdbclient/FailureMonitorClient.h"
#include "fdbserver/CoordinationInterface.h"
#include "fdbserver/WorkerInterface.actor.h"
#include "fdbserver/RestoreWorkerInterface.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
#include "fdbserver/ClusterRecruitmentInterface.h"
#include "fdbserver/ServerDBInfo.h"
#include "fdbserver/MoveKeys.actor.h"

View File

@ -330,7 +330,7 @@
<ClInclude Include="pubsub.h" />
<ClInclude Include="Knobs.h" />
<ClInclude Include="WorkerInterface.h" />
<ClInclude Include="RestoreWorkerInterface.h" />
<ClInclude Include="RestoreWorkerInterface.actor.h" />
<ClInclude Include="RestoreCommon.actor.h" />
<ClInclude Include="WaitFailure.h" />
<ClInclude Include="TesterInterface.actor.h" />

View File

@ -23,7 +23,7 @@
#include "fdbclient/BackupContainer.h"
#include "fdbserver/workloads/workloads.actor.h"
#include "fdbserver/workloads/BulkSetup.actor.h"
#include "fdbserver/RestoreWorkerInterface.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
#include "flow/actorcompiler.h" // This must be the last #include.
// A workload which test the correctness of backup and restore process
@ -251,23 +251,19 @@ struct BackupAndParallelRestoreCorrectnessWorkload : TestWorkload {
state int retryCount = 0;
loop {
try {
tr.reset();
state Version v = wait(tr.getReadVersion());
state Standalone<RangeResultRef> data = wait(
tr.getRange(firstGreaterOrEqual(doubleToTestKey(0.0, keyPrefix)),
firstGreaterOrEqual(doubleToTestKey(1.0, keyPrefix)), std::numeric_limits<int>::max()));
printf("dump DB, at %s. retryCount:%d Data size:%d, rangeResultInfo:%s\n", when.c_str(), retryCount,
data.size(), data.contents().toString().c_str());
dumpDBKVs(data, self);
break;
return Void();
} catch (Error& e) {
retryCount++;
TraceEvent(retryCount > 20 ? SevWarnAlways : SevWarn, "dumpDBError").error(e);
wait(tr.onError(e));
}
}
return Void();
}
virtual std::string description() { return "BackupAndParallelRestoreCorrectness"; }
@ -755,15 +751,6 @@ struct BackupAndParallelRestoreCorrectnessWorkload : TestWorkload {
state int64_t taskCount = wait(backupAgent.getTaskCount(tr));
state int waitCycles = 0;
if ((taskCount) && (0)) {
TraceEvent("BARW_EndingNonzeroTaskCount", randomID)
.detail("BackupTag", printable(self->backupTag))
.detail("TaskCount", taskCount)
.detail("WaitCycles", waitCycles);
printf("EndingNonZeroTasks: %ld\n", (long)taskCount);
wait(TaskBucket::debugPrintRange(cx, LiteralStringRef("\xff"), StringRef()));
}
loop {
waitCycles++;

View File

@ -267,7 +267,6 @@ struct ConfigureDatabaseWorkload : TestWorkload {
ACTOR Future<Void> singleDB( ConfigureDatabaseWorkload *self, Database cx ) {
state Transaction tr;
state int i;
loop {
if(g_simulator.speedUpSimulation) {
return Void();

View File

@ -40,7 +40,7 @@ static std::set<int> const& normalAttritionErrors() {
ACTOR Future<bool> ignoreSSFailuresForDuration(Database cx, double duration) {
// duration doesn't matter since this won't timeout
TraceEvent("IgnoreSSFailureStart");
bool _ = wait(setHealthyZone(cx, ignoreSSFailuresZoneString, 0));
wait(success(setHealthyZone(cx, ignoreSSFailuresZoneString, 0)));
TraceEvent("IgnoreSSFailureWait");
wait(delay(duration));
TraceEvent("IgnoreSSFailureClear");
@ -306,8 +306,8 @@ struct MachineAttritionWorkload : TestWorkload {
state LocalityData targetMachine = self->machines.back();
if(BUGGIFY_WITH_PROB(0.01)) {
TEST(true); //Marked a zone for maintenance before killing it
bool _ =
wait(setHealthyZone(cx, targetMachine.zoneId().get(), deterministicRandom()->random01() * 20));
wait(success(
setHealthyZone(cx, targetMachine.zoneId().get(), deterministicRandom()->random01() * 20)));
} else if (BUGGIFY_WITH_PROB(0.005)) {
TEST(true); // Disable DD for all storage server failures
self->ignoreSSFailures =

View File

@ -427,7 +427,7 @@ struct MakoWorkload : TestWorkload {
ACTOR template<class T>
static Future<Void> logLatency(Future<T> f, ContinuousSample<double>* opLatencies){
state double opBegin = now();
T value = wait(f);
wait(success(f));
opLatencies->addSample(now() - opBegin);
return Void();
}

View File

@ -23,7 +23,7 @@
#include "fdbclient/BackupContainer.h"
#include "fdbserver/workloads/workloads.actor.h"
#include "fdbserver/workloads/BulkSetup.actor.h"
#include "fdbserver/RestoreWorkerInterface.h"
#include "fdbserver/RestoreWorkerInterface.actor.h"
#include "flow/actorcompiler.h" // This must be the last #include.
// A workload which test the correctness of backup and restore process

View File

@ -159,7 +159,6 @@ public: // workload functions
keys.push_back(deterministicRandom()->randomInt64(0, INT64_MAX - 2));
}
state int retry = 0;
tr.reset();
loop {
try {
@ -190,6 +189,7 @@ public: // workload functions
ACTOR Future<Void> _start(Database cx, SnapTestWorkload* self) {
state Transaction tr(cx);
state bool snapFailed = false;
if (self->testID == 0) {
// create even keys before the snapshot
@ -202,7 +202,6 @@ public: // workload functions
wait(delay(toDelay));
state int retry = 0;
state bool snapFailed = false;
loop {
self->snapUID = deterministicRandom()->randomUniqueID();
try {