However, this job store breaks badly when this is used. The issue is that the current recursive retry mechanism assumes that batch mode is never used and that only one trigger is to be acquired.
When aquiring multiple triggers, it must not forget the triggers it has already acquired when recursing to retry the acquires that have failed.
So, when recursing, add the result of the recursion to the triggers you already have:-
The scheduler can be configured to batch acquire triggers:-
"org.quartz.scheduler.batchTriggerAcquisitionMaxCount", "50"
However, this job store breaks badly when this is used. The issue is that the current recursive retry mechanism assumes that batch mode is never used and that only one trigger is to be acquired.
When aquiring multiple triggers, it must not forget the triggers it has already acquired when recursing to retry the acquires that have failed.
So, when recursing, add the result of the recursion to the triggers you already have:-
triggers.addAll(acquireNextTriggers(noLaterThan, maxCount - triggers.size(), timeWindow));