@@ -110,7 +110,10 @@ void eventProcessingFinished(
110110 ExecutionScope executionScope , PostExecutionControl postExecutionControl ) {
111111 try {
112112 lock .lock ();
113- log .debug ("Event processing finished. Scope: {}" , executionScope );
113+ log .debug (
114+ "Event processing finished. Scope: {}, PostExecutionControl: {}" ,
115+ executionScope ,
116+ postExecutionControl );
114117 unsetUnderExecution (executionScope .getCustomResourceUid ());
115118
116119 if (retry != null && postExecutionControl .exceptionDuringExecution ()) {
@@ -143,18 +146,27 @@ private void handleRetryOnException(ExecutionScope executionScope) {
143146 eventBuffer .putBackEvents (executionScope .getCustomResourceUid (), executionScope .getEvents ());
144147
145148 if (newEventsExists ) {
149+ log .debug ("New events exists for for resource id: {}" , executionScope .getCustomResourceUid ());
146150 executeBufferedEvents (executionScope .getCustomResourceUid ());
147151 return ;
148152 }
149153 Optional <Long > nextDelay = execution .nextDelay ();
154+
150155 nextDelay .ifPresent (
151- delay ->
152- eventSourceManager
153- .getRetryTimerEventSource ()
154- .scheduleOnce (executionScope .getCustomResource (), delay ));
156+ delay -> {
157+ log .debug (
158+ "Scheduling timer event for retry with delay:{} for resource: {}" ,
159+ delay ,
160+ executionScope .getCustomResourceUid ());
161+ eventSourceManager
162+ .getRetryTimerEventSource ()
163+ .scheduleOnce (executionScope .getCustomResource (), delay );
164+ });
155165 }
156166
157167 private void markSuccessfulExecutionRegardingRetry (ExecutionScope executionScope ) {
168+ log .debug (
169+ "Marking successful execution for resource: {}" , executionScope .getCustomResourceUid ());
158170 retryState .remove (executionScope .getCustomResourceUid ());
159171 eventSourceManager
160172 .getRetryTimerEventSource ()
0 commit comments