fix: keep scheduler affinity out of runtime checks

This commit is contained in:
RWDai
2026-05-05 11:23:54 +08:00
parent eb8878695a
commit 9ef7952da5
4 changed files with 53 additions and 23 deletions
@@ -1,6 +1,6 @@
use std::collections::BTreeSet;
use aether_scheduler_core::{candidate_key, SchedulerAffinityTarget};
use aether_scheduler_core::candidate_key;
use super::runtime::{current_candidate_runtime_skip_reason, CandidateRuntimeSelectionSnapshot};
use super::{SchedulerMinimalCandidateSelectionCandidate, SchedulerSkippedCandidate};
@@ -9,7 +9,6 @@ pub(super) fn resolve_scheduler_candidate_selectability(
candidates: Vec<SchedulerMinimalCandidateSelectionCandidate>,
runtime_snapshot: &CandidateRuntimeSelectionSnapshot,
now_unix_secs: u64,
cached_affinity_target: Option<&SchedulerAffinityTarget>,
) -> (
Vec<SchedulerMinimalCandidateSelectionCandidate>,
Vec<SchedulerSkippedCandidate>,
@@ -21,12 +20,9 @@ pub(super) fn resolve_scheduler_candidate_selectability(
for candidate in candidates {
let key = candidate_key(&candidate);
if let Some(skip_reason) = current_candidate_runtime_skip_reason(
&candidate,
runtime_snapshot,
now_unix_secs,
cached_affinity_target,
) {
if let Some(skip_reason) =
current_candidate_runtime_skip_reason(&candidate, runtime_snapshot, now_unix_secs)
{
if emitted_skipped_keys.insert(key) {
skipped.push(SchedulerSkippedCandidate {
candidate,