FastRestore:Applier:Use isSchedulable to guard OOM

This commit is contained in:
Meng Xu 2020-02-26 14:12:56 -08:00
parent ca726fc68e
commit a354f6ffa2
2 changed files with 5 additions and 1 deletions

View File

@ -112,7 +112,10 @@ ACTOR static Future<Void> handleSendMutationVectorRequest(RestoreSendVersionedMu
.detail("BatchIndex", req.batchIndex)
.detail("RestoreAsset", req.asset.toString())
.detail("ProcessedFileVersion", curFilePos.get())
.detail("Request", req.toString());
.detail("Request", req.toString())
.detail("CurrentMemory", getSystemStatistics().processMemory);
wait(isSchedulable(self, req.batchIndex, __FUNCTION__);
wait(curFilePos.whenAtLeast(req.prevVersion));

View File

@ -53,6 +53,7 @@ struct RestoreSimpleRequest;
using VersionedMutationsMap = std::map<Version, MutationsVec>;
ACTOR Future<Void> isSchedulable(Reference<RestoreRoleData> self, int actorBatchIndex, std::string name);
ACTOR Future<Void> handleHeartbeat(RestoreSimpleRequest req, UID id);
ACTOR Future<Void> handleInitVersionBatchRequest(RestoreVersionBatchRequest req, Reference<RestoreRoleData> self);
void handleFinishRestoreRequest(const RestoreFinishRequest& req, Reference<RestoreRoleData> self);