FastRestore:fix compilation error for version batch state
This commit is contained in:
parent
fe8b8bbbff
commit
a6e66da29f
|
@ -203,13 +203,16 @@ struct StagingKeyRange {
|
|||
|
||||
// Applier state in each verion batch
|
||||
class ApplierVersionBatchState : RoleVersionBatchState {
|
||||
public:
|
||||
static const int NOT_INIT = 0;
|
||||
static const int INIT = 1;
|
||||
static const int RECEIVE_MUTATIONS = 2;
|
||||
static const int WRITE_TO_DB = 3;
|
||||
static const int INVALID = 4;
|
||||
|
||||
explicit ApplierVersionBatchState(int newState) : vbState(newState) {}
|
||||
explicit ApplierVersionBatchState(int newState) {
|
||||
vbState = newState;
|
||||
}
|
||||
};
|
||||
|
||||
struct ApplierBatchData : public ReferenceCounted<ApplierBatchData> {
|
||||
|
|
|
@ -43,13 +43,16 @@
|
|||
#include "flow/actorcompiler.h" // has to be last include
|
||||
|
||||
class LoaderVersionBatchState : RoleVersionBatchState {
|
||||
public:
|
||||
static const int NOT_INIT = 0;
|
||||
static const int INIT = 1;
|
||||
static const int LOAD_FILE = 2;
|
||||
static const int SEND_MUTATIONS = 3;
|
||||
static const int INVALID = 4;
|
||||
|
||||
explicit LoaderVersionBatchState(int newState) : vbState(newState) {}
|
||||
explicit LoaderVersionBatchState(int newState) {
|
||||
vbState = newState;
|
||||
}
|
||||
|
||||
// static std::string getVersionBatchState(int vbState) {
|
||||
// switch(vbSTate) {
|
||||
|
@ -152,15 +155,15 @@ struct RestoreLoaderData : RestoreRoleData, public ReferenceCounted<RestoreLoade
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
std::string getVersionBatchState(int batchIndex) {
|
||||
int getVersionBatchState(int batchIndex) {
|
||||
std::map<int, Reference<LoaderBatchData>>::iterator item = batch.find(batchIndex);
|
||||
ASSERT(item != batch.end());
|
||||
return item->second->vbState;
|
||||
return item->second->vbState.get();
|
||||
}
|
||||
void setVersionBatchState(int batchIndex, RoleVersionBatchState vbState) {
|
||||
void setVersionBatchState(int batchIndex, int vbState) {
|
||||
std::map<int, Reference<LoaderBatchData>>::iterator item = batch.find(batchIndex);
|
||||
ASSERT(item != batch.end());
|
||||
item->second->vbState = (LoaderVersionBatchState) vbState;
|
||||
item->second->vbState = vbState;
|
||||
}
|
||||
|
||||
void initVersionBatch(int batchIndex) {
|
||||
|
|
|
@ -113,10 +113,11 @@ public:
|
|||
return vbState;
|
||||
}
|
||||
|
||||
operator = (int newState) {
|
||||
void operator = (int newState) {
|
||||
vbState = newState;
|
||||
}
|
||||
|
||||
explicit RoleVersionBatchState() : vbState(INVALID) {}
|
||||
explicit RoleVersionBatchState(int newState) : vbState(newState) {}
|
||||
|
||||
int vbState;
|
||||
|
|
Loading…
Reference in New Issue