Skip to content

Commit

Permalink
Scheduler: restore a couple of missing pieces from the last merge
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven committed Dec 9, 2021
1 parent dad6942 commit 98dd0ec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
22 changes: 13 additions & 9 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---

Checks: >
clang-analyzer-*,
-clang-diagnostic-unknown-attributes,
-clang-diagnostic-return-type
modernize-*,
-modernize-use-trailing-return-type,
readability-*,
-readability-magic-numbers,
-readability-redundant-string-cstr,
-readability-implicit-bool-conversion
clang-analyzer-*,
-clang-diagnostic-unknown-attributes,
-clang-diagnostic-return-type
modernize-*,
-modernize-use-trailing-return-type,
readability-*,
-readability-magic-numbers,
-readability-redundant-string-cstr,
-readability-implicit-bool-conversion,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-else-after-return
9 changes: 7 additions & 2 deletions src/scheduler/Scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,11 @@ faabric::util::SchedulingDecision Scheduler::makeSchedulingDecision(
if (remainder > 0) {
std::vector<std::string> unregisteredHosts;
if (hostKindDifferent) {
unregisteredHosts = getUnregisteredHosts(funcStr);
} else {
for (auto&& h : getAvailableHostsForFunction(firstMsg)) {
unregisteredHosts.push_back(std::move(h));
}
} else {
unregisteredHosts = getUnregisteredHosts(funcStr);
}

for (const auto& h : unregisteredHosts) {
Expand Down Expand Up @@ -737,6 +737,11 @@ faabric::util::SchedulingDecision Scheduler::doCallFunctions(
auto* newMsg = hostRequest->add_messages();
*newMsg = req->messages().at(msgIdx);
newMsg->set_executeslocally(false);
if (!newMsg->directresulthost().empty()) {
faabric::util::UniqueLock resultsLock(localResultsMutex);
localResults.insert(
{ newMsg->id(), std::make_shared<MessageLocalResult>() });
}
}

// Dispatch the calls
Expand Down

0 comments on commit 98dd0ec

Please sign in to comment.