From ccf2ca73f3e185943cae026408ce8a0ea7a18d32 Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Thu, 8 Oct 2020 09:31:19 -0700 Subject: [PATCH] Fix Windows CMake build --- fdbclient/FileBackupAgent.actor.cpp | 4 ++-- fdbclient/ManagementAPI.actor.cpp | 2 +- fdbrpc/FlowTests.actor.cpp | 2 +- fdbrpc/ReplicationPolicy.h | 2 +- fdbrpc/ReplicationTypes.h | 11 +---------- fdbserver/KeyValueStoreMemory.actor.cpp | 2 +- flow/ThreadHelper.actor.h | 2 +- flow/flow.h | 5 +++-- 8 files changed, 11 insertions(+), 19 deletions(-) diff --git a/fdbclient/FileBackupAgent.actor.cpp b/fdbclient/FileBackupAgent.actor.cpp index b8bbab844c..a05eca4b14 100644 --- a/fdbclient/FileBackupAgent.actor.cpp +++ b/fdbclient/FileBackupAgent.actor.cpp @@ -943,14 +943,14 @@ namespace fileBackup { Future handleError(Database cx, Reference task, Error const& error) final override { return RestoreConfig(task).logError(cx, error, format("'%s' on '%s'", error.what(), task->params[Task::reservedTaskParamKeyType].printable().c_str())); } - virtual std::string toString(Reference task) const override { return ""; } + virtual std::string toString(Reference task) const { return ""; } }; struct BackupTaskFuncBase : TaskFuncBase { Future handleError(Database cx, Reference task, Error const& error) final override { return BackupConfig(task).logError(cx, error, format("'%s' on '%s'", error.what(), task->params[Task::reservedTaskParamKeyType].printable().c_str())); } - virtual std::string toString(Reference task) const override { return ""; } + virtual std::string toString(Reference task) const { return ""; } }; ACTOR static Future>> getBlockOfShards(Reference tr, Key beginKey, Key endKey, int limit) { diff --git a/fdbclient/ManagementAPI.actor.cpp b/fdbclient/ManagementAPI.actor.cpp index cca55fafcc..4010fb9088 100644 --- a/fdbclient/ManagementAPI.actor.cpp +++ b/fdbclient/ManagementAPI.actor.cpp @@ -1125,7 +1125,7 @@ struct NameQuorumChange final : IQuorumChange { CoordinatorsResult& t) override { return otherChange->getDesiredCoordinators(tr, oldCoordinators, cf, t); } - std::string getDesiredClusterKeyName() const override { return newName; } + std::string getDesiredClusterKeyName() const { return newName; } }; Reference nameQuorumChange(std::string const& name, Reference const& other) { return Reference(new NameQuorumChange( name, other )); diff --git a/fdbrpc/FlowTests.actor.cpp b/fdbrpc/FlowTests.actor.cpp index 584c569905..2429a29ebe 100644 --- a/fdbrpc/FlowTests.actor.cpp +++ b/fdbrpc/FlowTests.actor.cpp @@ -84,7 +84,7 @@ class LambdaCallback final : public CallbackType, public FastAllocatedname(); } + std::string embeddedPolicyName() const { return _policy->name(); } int getCount() const { return _count; } std::string info() const override { return format("%s^%d x ", _attribKey.c_str(), _count) + _policy->info(); } int maxResults() const override { return _count * _policy->maxResults(); } diff --git a/fdbrpc/ReplicationTypes.h b/fdbrpc/ReplicationTypes.h index bc238e3a3c..6e348b83b5 100644 --- a/fdbrpc/ReplicationTypes.h +++ b/fdbrpc/ReplicationTypes.h @@ -69,7 +69,7 @@ typedef std::pair AttribRecord; // This structure represents the LocalityData class as an integer map -struct KeyValueMap : public ReferenceCounted { +struct KeyValueMap final : public ReferenceCounted { std::vector _keyvaluearray; KeyValueMap() {} @@ -102,9 +102,6 @@ struct KeyValueMap : public ReferenceCounted { return ((lower != _keyvaluearray.end()) && (lower->first == indexKey) && (lower->second == indexValue)); } - void addref() override { ReferenceCounted::addref(); } - void delref() override { ReferenceCounted::delref(); } - static bool compareKeyValue(const AttribRecord& lhs, const AttribRecord& rhs) { return (lhs.first < rhs.first) || (!(rhs.first < lhs.first) && (lhs.second < rhs.second)); } @@ -112,7 +109,6 @@ struct KeyValueMap : public ReferenceCounted { { return (lhs.first < rhs.first); } }; - // This class stores the information for each entry within the locality map struct LocalityRecord final : public ReferenceCounted { Reference _dataMap; @@ -125,9 +121,6 @@ struct LocalityRecord final : public ReferenceCounted { return *this; } - void addref() override { ReferenceCounted::addref(); } - void delref() override { ReferenceCounted::delref(); } - Optional getValue(AttribKey indexKey) const { return _dataMap->getValue(indexKey); } @@ -204,8 +197,6 @@ struct StringToIntMap final : public ReferenceCounted { } return memSize; } - void addref() override { ReferenceCounted::addref(); } - void delref() override { ReferenceCounted::delref(); } }; extern const std::vector emptyEntryArray; diff --git a/fdbserver/KeyValueStoreMemory.actor.cpp b/fdbserver/KeyValueStoreMemory.actor.cpp index dfb0f9a726..4fce2e8d8f 100644 --- a/fdbserver/KeyValueStoreMemory.actor.cpp +++ b/fdbserver/KeyValueStoreMemory.actor.cpp @@ -65,7 +65,7 @@ public: std::tuple getSize() const override { return data.size(); } - int64_t getAvailableSize() const override { + int64_t getAvailableSize() const { int64_t residentSize = data.sumTo(data.end()) + queue.totalSize() + // doesn't account for overhead in queue transactionSize; diff --git a/flow/ThreadHelper.actor.h b/flow/ThreadHelper.actor.h index e7272a83bc..32a18088be 100644 --- a/flow/ThreadHelper.actor.h +++ b/flow/ThreadHelper.actor.h @@ -374,7 +374,7 @@ public: void delref() override { ThreadSafeReferenceCounted>::delref(); } - void send(const T& value) override { + void send(const T& value) { if (TRACE_SAMPLE()) TraceEvent(SevSample, "Promise_send"); this->mutex.enter(); if (!canBeSetUnsafe()) { diff --git a/flow/flow.h b/flow/flow.h index 22d92d9c0a..a72465143d 100644 --- a/flow/flow.h +++ b/flow/flow.h @@ -339,6 +339,7 @@ struct Callback { Callback *prev, *next; virtual void fire(T const&) {} + virtual void fire(T&&) {} virtual void error(Error) {} virtual void unwait() {} @@ -534,8 +535,8 @@ public: int getFutureReferenceCount() const { return futures; } int getPromiseReferenceCount() const { return promises; } - virtual void destroy() override { delete this; } - virtual void cancel() override {} + virtual void destroy() { delete this; } + virtual void cancel() {} void addCallbackAndDelFutureRef(Callback* cb) { // We are always *logically* dropping one future reference from this, but if we are adding a first callback