[CAM-7576] A failed job is not unlocked when the FailedJobListener throws an exception Created: 30/Mar/17  Updated: 14/Jul/17  Resolved: 14/Jul/17

Status: Closed
Project: camunda BPM
Component/s: engine
Affects Version/s: 7.5.4
Fix Version/s: 7.7.0, 7.5.9, 7.6.5, 7.7.0-alpha2

Type: Bug Report Priority: L3 - Default
Reporter: Philipp Ossler Assignee: Svetlana Dorokhova
Resolution: Fixed Votes: 0
Labels: SUPPORT
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: 0 minutes

Issue Links:
Depedendency
Related
is related to CAM-5157 Creation of incidents is not null safe Closed

 Description   

Problem:
When a job execution fails then the FailedJobListener is invoked which can decrement the retries and unlock the job. If the FailedJobListener throws an exception then the whole transaction rolls back and the job is still locked.
This can happen when an incident creation fails because of an optimistic lock exception.

AT:

  • when the FailedJobListener throws an optimistic lock exception then try to invoke the listener again
  • I can configure the amount of retries


 Comments   
Comment by Thorben Lindhauer [ 26/Apr/17 ]

Review:

  • FailedJobListenerWithRetriesTest: Could lock job via JobEntity's setters instead of executing AcquireJobsCmd => more stable with respect to refactorings
  • org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.getFailedJobListenerMaxRetries(): Does not use the value from process engine configuration if the job is executed via ManagementService#executeJob
Comment by Michael Schoettes [ 14/Jul/17 ]

Could you please adjust the fix Versions

Generated at Fri Jul 19 03:38:41 CEST 2019 using JIRA 6.4.6#64021-sha1:33e5b454af4594f54560ac233c30a6e00459507e.