jstastny-cz commented on code in PR #2301:
URL: 
https://github.com/apache/incubator-kie-kogito-apps/pull/2301#discussion_r2791823085


##########
jobs/jobs-common-embedded/src/main/java/org/kie/kogito/app/jobs/impl/VertxJobScheduler.java:
##########
@@ -407,6 +417,14 @@ public JobTimeoutExecution call() throws Exception {
                 } catch (Exception exception) {
                     LOG.trace("Timeout {} with jobId {} will be retried if 
possible", timerId, jobId, exception);
                     JobDetails nextJobDetails = computeRetryIfAny(jobDetails);
+
+                    // Extract and set exception details AFTER 
computeRetryIfAny but BEFORE persistence
+                    // Note: computeRetryIfAny creates a new JobDetails 
object, so we must set exception details after it
+                    JobExecutionExceptionDetails exceptionDetails = 
extractExceptionDetails(exception);
+                    if (exceptionDetails != null) {
+                        nextJobDetails.setExceptionDetails(exceptionDetails);

Review Comment:
   Well, the nextJobDetails are actually the same Job instance, just with 
updated contents after the execution attempt. The previously executed job 
details are not persisted at all - it is handled through the nextJobDetails.
   
   Could this be caused by the other problem you mentioned - that the exception 
fields cleanup does not work correctly?
   Perhaps JobDetails with status RUNNING and EXECUTED should not have the 
exception fields set - it should be only present for RETRY or ERROR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to