Priority of failed tasks

Let’s suppose I have two jobs J1 (priority 200) and J2 (priority 100)

State of the invalidation queue:
J1: 2 pending, 2 running, 2 failed
J2: 4 pending, 2 failed

If I recover the failed tasks, in what order will they go in the queue?

  • Will failed tasks of J1 go before any J2 tasks?
  • Will recovered failed tasks of J1 go after any existing pending J1 tasks?

They will go in in no particular order, except that one job’s entries will be put in the queue before the other but there is no inherent ordering done.