diff --git a/src/planner/PlannerClient.cpp b/src/planner/PlannerClient.cpp index e8d32e4a1..a7115fd61 100644 --- a/src/planner/PlannerClient.cpp +++ b/src/planner/PlannerClient.cpp @@ -315,8 +315,10 @@ faabric::batch_scheduler::SchedulingDecision PlannerClient::callFunctions( } // To optimise for single-host shared memory, we can skip sending the - // snapshot to the planner by setting the singlehost flag - if (!req->singlehost()) { + // snapshot to the planner by setting the single host hint + // FIXME(async-snaps): ideally, snapshots would be synchornised + // _after_ the scheduling decision is made + if (!req->singlehosthint()) { snapshotKey = faabric::util::getMainThreadSnapshotKey(firstMsg); } } else { diff --git a/src/scheduler/Executor.cpp b/src/scheduler/Executor.cpp index 48b6b9b0e..050a8e9cf 100644 --- a/src/scheduler/Executor.cpp +++ b/src/scheduler/Executor.cpp @@ -171,6 +171,10 @@ std::vector> Executor::executeThreads( // Perform snapshot updates if not on single host if (!isSingleHost) { + // Add the diffs corresponding to this executor + auto diffs = mergeDirtyRegions(msg); + snap->queueDiffs(diffs); + // Write queued changes to snapshot int nWritten = snap->writeQueuedDiffs();