FastRestore:Apply clang-format
This commit is contained in:
parent
a6e66da29f
commit
f4cd0ef74f
|
@ -213,6 +213,16 @@ public:
|
|||
explicit ApplierVersionBatchState(int newState) {
|
||||
vbState = newState;
|
||||
}
|
||||
|
||||
~ApplierVersionBatchState() = default;
|
||||
|
||||
void operator = (int newState) {
|
||||
vbState = newState;
|
||||
}
|
||||
|
||||
int get() {
|
||||
return RoleVersionBatchState::get();
|
||||
}
|
||||
};
|
||||
|
||||
struct ApplierBatchData : public ReferenceCounted<ApplierBatchData> {
|
||||
|
|
|
@ -54,6 +54,16 @@ public:
|
|||
vbState = newState;
|
||||
}
|
||||
|
||||
~LoaderVersionBatchState() = default;
|
||||
|
||||
void operator = (int newState) {
|
||||
vbState = newState;
|
||||
}
|
||||
|
||||
int get() {
|
||||
return RoleVersionBatchState::get();
|
||||
}
|
||||
|
||||
// static std::string getVersionBatchState(int vbState) {
|
||||
// switch(vbSTate) {
|
||||
// case NOT_INIT: return "NOT_INIT";
|
||||
|
|
|
@ -57,11 +57,11 @@ ACTOR Future<Void> handleInitVersionBatchRequest(RestoreVersionBatchRequest req,
|
|||
.detail("BatchIndex", req.batchIndex)
|
||||
.detail("Role", getRoleStr(self->role))
|
||||
.detail("VersionBatchNotifiedVersion", self->versionBatchId.get())
|
||||
.detail("PreviousVersionBatchState", batchData->vbState);
|
||||
.detail("PreviousVersionBatchState", self->getVersionBatchState(req.batchIndex));
|
||||
// batchId is continuous. (req.batchIndex-1) is the id of the just finished batch.
|
||||
wait(self->versionBatchId.whenAtLeast(req.batchIndex - 1));
|
||||
|
||||
batchData->vbState = ApplierVersionBatchState::INIT;
|
||||
self->setVersionBatchState(req.batchIndex, ApplierVersionBatchState::INIT);
|
||||
if (self->versionBatchId.get() == req.batchIndex - 1) {
|
||||
self->initVersionBatch(req.batchIndex);
|
||||
TraceEvent("FastRestoreInitVersionBatch")
|
||||
|
@ -146,11 +146,11 @@ ACTOR Future<Void> traceRoleVersionBatchProgress(Reference<RestoreRoleData> self
|
|||
int maxBatchIndex = self->versionBatchId.get();
|
||||
|
||||
TraceEvent ev("FastRestoreVersionBatchProgress", self->nodeID);
|
||||
ev.detail("Role", role)
|
||||
ev.detail("Role", role);
|
||||
ev.detail("Node", self->nodeID);
|
||||
while (batchIndex <= maxBatchIndex) {
|
||||
ev.detail("BatchIndex", batchIndex);
|
||||
ev.detail("VersionBatchState", self->batch[batchIndex]->vbState);
|
||||
ev.detail("VersionBatchState", self->getVersionBatchState(batchIndex));
|
||||
batchIndex++;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,17 +109,19 @@ class RoleVersionBatchState {
|
|||
public:
|
||||
static const int INVALID = -1;
|
||||
|
||||
int get() {
|
||||
virtual int get() {
|
||||
return vbState;
|
||||
}
|
||||
|
||||
void operator = (int newState) {
|
||||
virtual void operator = (int newState) {
|
||||
vbState = newState;
|
||||
}
|
||||
|
||||
explicit RoleVersionBatchState() : vbState(INVALID) {}
|
||||
explicit RoleVersionBatchState(int newState) : vbState(newState) {}
|
||||
|
||||
virtual ~RoleVersionBatchState() = default;
|
||||
|
||||
int vbState;
|
||||
};
|
||||
|
||||
|
@ -146,7 +148,7 @@ public:
|
|||
|
||||
RestoreRoleData() : role(RestoreRole::Invalid), cpuUsage(0.0), memory(0.0), residentMemory(0.0), delayedActors(0){};
|
||||
|
||||
virtual ~RestoreRoleData() {}
|
||||
virtual ~RestoreRoleData() = default;
|
||||
|
||||
UID id() const { return nodeID; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue