Sometimes, if Bulk Edit job launches with async mode in multi tenant environment, FolioExecutionContext is initialized with tenant id other than id of the tenant this job comes from. It causes a try to update a job that does not exist in this tenant.
Steps to Reproduce:
- Go to Bulk Edit and perform edit for users or items.
- Create another tenant and do Step 1 at the same time.
- Repeat Steps 1 and 2 simultaneously 20 - 30 times.
- Go to Export manager and you may see that a couple of jobs have SCHEDULED status.
- Retrieve logs for mod-data-export-spring and you may see ERROR like Update for unknown job: job id
- Retrieve logs for mod-data-export-worker and you may see the following ERROR:
No mentioned errors in the log, no jobs with SCHEDULED status in multi tenant cluster.
Jobs are getting stuck with SCHEDULED status, errors in the log.
This bug appears only in multi tenant environment and less often than it was for CIRCULATION LOG.