diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventProcessor.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventProcessor.java index e46878f927..df9d0f06fc 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventProcessor.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventProcessor.java @@ -160,7 +160,7 @@ private void submitReconciliationExecution(ResourceState state) { state.unMarkEventReceived(); metrics.reconcileCustomResource(state.getId(), state.getRetry(), metricsMetadata); log.debug("Executing events for custom resource. Scope: {}", executionScope); - executor.execute(new ControllerExecution(executionScope)); + executor.execute(new ReconcilerExecutor(executionScope)); } else { log.debug( "Skipping executing controller for resource id: {}. Controller in execution: {}. Latest Resource present: {}", @@ -376,10 +376,10 @@ private void handleAlreadyMarkedEvents() { } } - private class ControllerExecution implements Runnable { + private class ReconcilerExecutor implements Runnable { private final ExecutionScope executionScope; - private ControllerExecution(ExecutionScope executionScope) { + private ReconcilerExecutor(ExecutionScope executionScope) { this.executionScope = executionScope; } @@ -390,7 +390,7 @@ public void run() { final var name = thread.getName(); try { MDCUtils.addResourceInfo(executionScope.getResource()); - thread.setName("EventHandler-" + controllerName); + thread.setName("ReconcilerExecutor-" + controllerName + "-" + thread.getId()); PostExecutionControl postExecutionControl = reconciliationDispatcher.handleExecution(executionScope); eventProcessingFinished(executionScope, postExecutionControl); diff --git a/operator-framework/src/test/java/io/javaoperatorsdk/operator/ControllerExecutionIT.java b/operator-framework/src/test/java/io/javaoperatorsdk/operator/ReconcilerExecutorIT.java similarity index 99% rename from operator-framework/src/test/java/io/javaoperatorsdk/operator/ControllerExecutionIT.java rename to operator-framework/src/test/java/io/javaoperatorsdk/operator/ReconcilerExecutorIT.java index 31eabc0292..07a022adb1 100644 --- a/operator-framework/src/test/java/io/javaoperatorsdk/operator/ControllerExecutionIT.java +++ b/operator-framework/src/test/java/io/javaoperatorsdk/operator/ReconcilerExecutorIT.java @@ -15,7 +15,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; -class ControllerExecutionIT { +class ReconcilerExecutorIT { @RegisterExtension LocallyRunOperatorExtension operator =