From 0f8f4ebce63910c08e3da1829f3b5516131026af Mon Sep 17 00:00:00 2001 From: Carlos Segarra Date: Thu, 11 Jan 2024 18:00:16 +0000 Subject: [PATCH] tests: fix executeThreads call --- src/planner/PlannerClient.cpp | 6 ++++-- src/scheduler/Executor.cpp | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) 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();