Abhishek Chaudhary created FINERACT-2916:
--------------------------------------------
Summary: Post Interest For Savings and Recalculate Interest For
Loans jobs report success when worker threads fail
Key: FINERACT-2916
URL: https://issues.apache.org/jira/browse/FINERACT-2916
Project: Apache Fineract
Issue Type: Bug
Components: Job Scheduler, Loan, Savings
Affects Versions: 1.15.0
Reporter: Abhishek Chaudhary
Fix For: 1.16.0
Both jobs split the work across worker threads. The workers
({{SavingsSchedularInterestPoster}}, {{RecalculateInterestPoster}}) collect
per-account errors and throw {{JobExecutionException}}. The tasklets'
{{checkCompletion}} catches the resulting {{ExecutionException}}, only logs it,
and the step finishes with status COMPLETED. {{InterruptedException}} is also
swallowed without restoring the thread's interrupt flag.
In Post Interest For Savings, one failing account skips the batch update for
every account in its sub-batch (up to {{batch-size}}, default 100). Interest is
not posted for any of them, and the job history still reports success, so
operators have no signal. The Recalculate Interest For Loans job behaves the
same way when run with {{officeId}}, while its branch without {{officeId}} does
throw {{JobExecutionException}}. The swallowing came with the multithreaded
rewrite of the savings job (FINERACT-1442).
*Expected:* after all workers finish, the tasklet throws
{{JobExecutionException}} with the collected worker failures so the job is
marked FAILED, and the interrupt flag is restored.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)