Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
1daidai1 committed Dec 12, 2024
1 parent 9ba39df commit 047b895
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/CraneCtld/AccountManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,12 +935,13 @@ AccountManager::CraneExpected<void> AccountManager::CheckAndApplyQosLimitOnTask(
auto partition_it = user_share_ptr->account_to_attrs_map.at(account)
.allowed_partition_qos_map.find(task->partition_id);
if (partition_it == user_share_ptr->account_to_attrs_map.at(account)
.allowed_partition_qos_map.end())
.allowed_partition_qos_map.end()) {

CRANE_ERROR(
"CheckAndApplyQosLimitOnTask error: Partition is not allowed for "
"this user");
return std::unexpected(CraneErrCode::ERR_ALLOWED_PARTITION);

return std::unexpected(CraneErrCode::ERR_ALLOWED_PARTITION);
}
if (task->qos.empty()) {
// Default qos
task->qos = partition_it->second.first;
Expand All @@ -963,7 +964,8 @@ AccountManager::CraneExpected<void> AccountManager::CheckAndApplyQosLimitOnTask(
}
} else {
if (task->qos.empty()) {
@@ -960,19 +969,25 @@ result::result<void, std::string> AccountManager::CheckAndApplyQosLimitOnTask(
task->qos = kUnlimitedQosName;
}
}

const Qos* qos_share_ptr = GetExistedQosInfoNoLock_(task->qos);
Expand Down
2 changes: 1 addition & 1 deletion src/CraneCtld/CtldGrpcServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ grpc::Status CraneCtldServiceImpl::CforedStream(
result = std::expected<task_id_t, std::string>{
submit_result.value().get()};
} else {
result = result::fail(CraneErrCodeStr(submit_result.error()));
result = std::unexpected(CraneErrCodeStr(submit_result.error()));
}
ok = stream_writer->WriteTaskIdReply(payload.pid(), result);

Expand Down

0 comments on commit 047b895

Please sign in to comment.