Fix Windows CMake build
This commit is contained in:
parent
a9607bdcec
commit
ccf2ca73f3
|
@ -943,14 +943,14 @@ namespace fileBackup {
|
||||||
Future<Void> handleError(Database cx, Reference<Task> task, Error const& error) final override {
|
Future<Void> handleError(Database cx, Reference<Task> 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()));
|
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> task) const override { return ""; }
|
virtual std::string toString(Reference<Task> task) const { return ""; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BackupTaskFuncBase : TaskFuncBase {
|
struct BackupTaskFuncBase : TaskFuncBase {
|
||||||
Future<Void> handleError(Database cx, Reference<Task> task, Error const& error) final override {
|
Future<Void> handleError(Database cx, Reference<Task> 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()));
|
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> task) const override { return ""; }
|
virtual std::string toString(Reference<Task> task) const { return ""; }
|
||||||
};
|
};
|
||||||
|
|
||||||
ACTOR static Future<Standalone<VectorRef<KeyRef>>> getBlockOfShards(Reference<ReadYourWritesTransaction> tr, Key beginKey, Key endKey, int limit) {
|
ACTOR static Future<Standalone<VectorRef<KeyRef>>> getBlockOfShards(Reference<ReadYourWritesTransaction> tr, Key beginKey, Key endKey, int limit) {
|
||||||
|
|
|
@ -1125,7 +1125,7 @@ struct NameQuorumChange final : IQuorumChange {
|
||||||
CoordinatorsResult& t) override {
|
CoordinatorsResult& t) override {
|
||||||
return otherChange->getDesiredCoordinators(tr, oldCoordinators, cf, t);
|
return otherChange->getDesiredCoordinators(tr, oldCoordinators, cf, t);
|
||||||
}
|
}
|
||||||
std::string getDesiredClusterKeyName() const override { return newName; }
|
std::string getDesiredClusterKeyName() const { return newName; }
|
||||||
};
|
};
|
||||||
Reference<IQuorumChange> nameQuorumChange(std::string const& name, Reference<IQuorumChange> const& other) {
|
Reference<IQuorumChange> nameQuorumChange(std::string const& name, Reference<IQuorumChange> const& other) {
|
||||||
return Reference<IQuorumChange>(new NameQuorumChange( name, other ));
|
return Reference<IQuorumChange>(new NameQuorumChange( name, other ));
|
||||||
|
|
|
@ -84,7 +84,7 @@ class LambdaCallback final : public CallbackType, public FastAllocated<LambdaCal
|
||||||
func(t);
|
func(t);
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
void fire(T&& t) override {
|
void fire(T&& t) {
|
||||||
CallbackType::remove();
|
CallbackType::remove();
|
||||||
func(std::move(t));
|
func(std::move(t));
|
||||||
delete this;
|
delete this;
|
||||||
|
|
|
@ -118,7 +118,7 @@ struct PolicyAcross final : IReplicationPolicy, public ReferenceCounted<PolicyAc
|
||||||
explicit PolicyAcross(const PolicyAcross& other) : PolicyAcross(other._count, other._attribKey, other._policy) {}
|
explicit PolicyAcross(const PolicyAcross& other) : PolicyAcross(other._count, other._attribKey, other._policy) {}
|
||||||
~PolicyAcross();
|
~PolicyAcross();
|
||||||
std::string name() const override { return "Across"; }
|
std::string name() const override { return "Across"; }
|
||||||
std::string embeddedPolicyName() const override { return _policy->name(); }
|
std::string embeddedPolicyName() const { return _policy->name(); }
|
||||||
int getCount() const { return _count; }
|
int getCount() const { return _count; }
|
||||||
std::string info() const override { return format("%s^%d x ", _attribKey.c_str(), _count) + _policy->info(); }
|
std::string info() const override { return format("%s^%d x ", _attribKey.c_str(), _count) + _policy->info(); }
|
||||||
int maxResults() const override { return _count * _policy->maxResults(); }
|
int maxResults() const override { return _count * _policy->maxResults(); }
|
||||||
|
|
|
@ -69,7 +69,7 @@ typedef std::pair<AttribKey, AttribValue> AttribRecord;
|
||||||
|
|
||||||
|
|
||||||
// This structure represents the LocalityData class as an integer map
|
// This structure represents the LocalityData class as an integer map
|
||||||
struct KeyValueMap : public ReferenceCounted<KeyValueMap> {
|
struct KeyValueMap final : public ReferenceCounted<KeyValueMap> {
|
||||||
std::vector<AttribRecord> _keyvaluearray;
|
std::vector<AttribRecord> _keyvaluearray;
|
||||||
|
|
||||||
KeyValueMap() {}
|
KeyValueMap() {}
|
||||||
|
@ -102,9 +102,6 @@ struct KeyValueMap : public ReferenceCounted<KeyValueMap> {
|
||||||
return ((lower != _keyvaluearray.end()) && (lower->first == indexKey) && (lower->second == indexValue));
|
return ((lower != _keyvaluearray.end()) && (lower->first == indexKey) && (lower->second == indexValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
void addref() override { ReferenceCounted<KeyValueMap>::addref(); }
|
|
||||||
void delref() override { ReferenceCounted<KeyValueMap>::delref(); }
|
|
||||||
|
|
||||||
static bool compareKeyValue(const AttribRecord& lhs, const AttribRecord& rhs)
|
static bool compareKeyValue(const AttribRecord& lhs, const AttribRecord& rhs)
|
||||||
{ return (lhs.first < rhs.first) || (!(rhs.first < lhs.first) && (lhs.second < rhs.second)); }
|
{ return (lhs.first < rhs.first) || (!(rhs.first < lhs.first) && (lhs.second < rhs.second)); }
|
||||||
|
|
||||||
|
@ -112,7 +109,6 @@ struct KeyValueMap : public ReferenceCounted<KeyValueMap> {
|
||||||
{ return (lhs.first < rhs.first); }
|
{ return (lhs.first < rhs.first); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// This class stores the information for each entry within the locality map
|
// This class stores the information for each entry within the locality map
|
||||||
struct LocalityRecord final : public ReferenceCounted<LocalityRecord> {
|
struct LocalityRecord final : public ReferenceCounted<LocalityRecord> {
|
||||||
Reference<KeyValueMap> _dataMap;
|
Reference<KeyValueMap> _dataMap;
|
||||||
|
@ -125,9 +121,6 @@ struct LocalityRecord final : public ReferenceCounted<LocalityRecord> {
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void addref() override { ReferenceCounted<LocalityRecord>::addref(); }
|
|
||||||
void delref() override { ReferenceCounted<LocalityRecord>::delref(); }
|
|
||||||
|
|
||||||
Optional<AttribValue> getValue(AttribKey indexKey) const {
|
Optional<AttribValue> getValue(AttribKey indexKey) const {
|
||||||
return _dataMap->getValue(indexKey);
|
return _dataMap->getValue(indexKey);
|
||||||
}
|
}
|
||||||
|
@ -204,8 +197,6 @@ struct StringToIntMap final : public ReferenceCounted<StringToIntMap> {
|
||||||
}
|
}
|
||||||
return memSize;
|
return memSize;
|
||||||
}
|
}
|
||||||
void addref() override { ReferenceCounted<StringToIntMap>::addref(); }
|
|
||||||
void delref() override { ReferenceCounted<StringToIntMap>::delref(); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const std::vector<LocalityEntry> emptyEntryArray;
|
extern const std::vector<LocalityEntry> emptyEntryArray;
|
||||||
|
|
|
@ -65,7 +65,7 @@ public:
|
||||||
|
|
||||||
std::tuple<size_t, size_t, size_t> getSize() const override { return data.size(); }
|
std::tuple<size_t, size_t, size_t> 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
|
int64_t residentSize = data.sumTo(data.end()) + queue.totalSize() + // doesn't account for overhead in queue
|
||||||
transactionSize;
|
transactionSize;
|
||||||
|
|
||||||
|
|
|
@ -374,7 +374,7 @@ public:
|
||||||
|
|
||||||
void delref() override { ThreadSafeReferenceCounted<ThreadSingleAssignmentVar<T>>::delref(); }
|
void delref() override { ThreadSafeReferenceCounted<ThreadSingleAssignmentVar<T>>::delref(); }
|
||||||
|
|
||||||
void send(const T& value) override {
|
void send(const T& value) {
|
||||||
if (TRACE_SAMPLE()) TraceEvent(SevSample, "Promise_send");
|
if (TRACE_SAMPLE()) TraceEvent(SevSample, "Promise_send");
|
||||||
this->mutex.enter();
|
this->mutex.enter();
|
||||||
if (!canBeSetUnsafe()) {
|
if (!canBeSetUnsafe()) {
|
||||||
|
|
|
@ -339,6 +339,7 @@ struct Callback {
|
||||||
Callback<T> *prev, *next;
|
Callback<T> *prev, *next;
|
||||||
|
|
||||||
virtual void fire(T const&) {}
|
virtual void fire(T const&) {}
|
||||||
|
virtual void fire(T&&) {}
|
||||||
virtual void error(Error) {}
|
virtual void error(Error) {}
|
||||||
virtual void unwait() {}
|
virtual void unwait() {}
|
||||||
|
|
||||||
|
@ -534,8 +535,8 @@ public:
|
||||||
int getFutureReferenceCount() const { return futures; }
|
int getFutureReferenceCount() const { return futures; }
|
||||||
int getPromiseReferenceCount() const { return promises; }
|
int getPromiseReferenceCount() const { return promises; }
|
||||||
|
|
||||||
virtual void destroy() override { delete this; }
|
virtual void destroy() { delete this; }
|
||||||
virtual void cancel() override {}
|
virtual void cancel() {}
|
||||||
|
|
||||||
void addCallbackAndDelFutureRef(Callback<T>* cb) {
|
void addCallbackAndDelFutureRef(Callback<T>* cb) {
|
||||||
// We are always *logically* dropping one future reference from this, but if we are adding a first callback
|
// We are always *logically* dropping one future reference from this, but if we are adding a first callback
|
||||||
|
|
Loading…
Reference in New Issue