Fair (LIFO) scheduling for async executor

Is it possible to get fair async executor scheduling via Spring configuration?
As it can be seen in AcquireJobsCmd jobEntityManager.findJobsToExecute is used for getting available jobs, it does not use any kind of order by clause (obviously for performance reasons). This causes problem that ‘older’ steps might be never started if new jobs appear frequently enough

That’s correct, once any order is added, some databases quickly go into table scans when talking about millions of jobs in the table.

If that’s the case it feels like you need a larger threadpool.

we achived FIFO by overriding “selectJobsToExecute” query adding to it order by create_date_