fix(admission): 按候选唤醒同步队列头
同步准入释放容量后,分别唤醒每个独立平台模型队列的 FIFO 队头;只有任务实际绑定用户组时才同时约束用户组队头,避免一个已饱和候选阻塞其他候选补位。\n\n调度器单次最多处理 256 个真实队头,不唤醒整个等待队列。新增 PostgreSQL 集成测试覆盖无用户组的双候选并行唤醒,以及共享用户组下仍保持组级 FIFO。\n\n验证:gofmt;Store/Runner 聚焦测试;一次性 PostgreSQL 集成测试;git diff --check。
This commit is contained in:
@@ -34,6 +34,7 @@ const (
|
||||
asyncWorkerMaxWaitSeconds = 24 * 60 * 60
|
||||
acceptanceQueueLimit = 10000
|
||||
acceptanceQueueMaxWait = 15 * 60
|
||||
synchronousAdmissionWakeMax = 256
|
||||
)
|
||||
|
||||
func distributedAdmissionModelType(modelType string) bool {
|
||||
@@ -416,7 +417,7 @@ func (s *Service) dispatchWaitingSynchronousAdmissions(ctx context.Context) {
|
||||
return
|
||||
case <-s.admissionWake:
|
||||
}
|
||||
taskIDs, err := s.store.ListWaitingTaskAdmissionIDs(ctx, 1)
|
||||
taskIDs, err := s.store.ListWaitingTaskAdmissionIDs(ctx, synchronousAdmissionWakeMax)
|
||||
if err != nil {
|
||||
if s.logger != nil {
|
||||
s.logger.Warn("list waiting synchronous admissions failed", "error", err)
|
||||
|
||||
Reference in New Issue
Block a user