Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cacct priority val error #414

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix cacct priority val error #414

wants to merge 1 commit into from

Conversation

1daidai1
Copy link
Collaborator

No description provided.

@1daidai1
Copy link
Collaborator Author

前端PKUHPC/CraneSched-FrontEnd#230

@@ -2904,6 +2904,9 @@ std::vector<task_id_t> MultiFactorPriority::GetOrderedTaskIdList(
task->cached_priority = priority;
task->pending_reason = "Priority";
task_priority_vec.emplace_back(task.get(), priority);
task->MutableTaskToCtld()->set_priority(priority);
g_embedded_db_client->UpdateTaskToCtldIfExists(0, task->TaskDbId(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行代码不该加 删了

@@ -2904,6 +2904,9 @@ std::vector<task_id_t> MultiFactorPriority::GetOrderedTaskIdList(
task->cached_priority = priority;
task->pending_reason = "Priority";
task_priority_vec.emplace_back(task.get(), priority);
task->MutableTaskToCtld()->set_priority(priority);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

调度里面的代码都删了

@@ -130,6 +130,7 @@ message TaskToCtld {

bool requeue_if_failed = 12;
bool get_user_env = 13;
uint32 priority = 14;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提交的时候哪来的优先级

Copy link
Collaborator Author

@1daidai1 1daidai1 Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加这个的目的是考虑突然掉电情况下恢复任务running任务恢复以及completed任务没有存在mongodb中,从嵌入式db数据库恢复过来优先级变成零的情况,没有保存最后一次的优先级,那么最后存在mongodb会出现优先级不是真实优先级的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants