feat: reject job submissions to 'lost_and_found' reserved queue in preCheckJobRequest

This commit is contained in:
Rongsong Shen 2026-05-14 03:19:34 +00:00
parent 91e66b8b07
commit bc921666de
2 changed files with 83 additions and 0 deletions

View file

@ -1535,6 +1535,13 @@ func preCheckJobRequest(req *models.JobSubmitRequest) ([]int, error) {
if req.QueueName == "" {
req.QueueName = "normal"
} else {
// Reject submissions to the reserved internal recovery queue.
if req.QueueName == "lost_and_found" {
logger.Error("Job submission to reserved queue rejected",
zap.String("queue_name", req.QueueName))
return nil, fmt.Errorf(
"cannot submit jobs to 'lost_and_found' — this is an internal recovery queue")
}
//validate queue_name whether exists
queueInfo, ok := store.Queues.Get(req.QueueName)
if !ok {