Skip to content

Commit 9574a03

Browse files
committed
fix: controllers starting is not io-bound per se
1 parent 33b3e98 commit 9574a03

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/ControllerManager.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import org.slf4j.Logger;
99
import org.slf4j.LoggerFactory;
1010

11-
import io.javaoperatorsdk.operator.api.config.ExecutorServiceManager;
1211
import io.javaoperatorsdk.operator.processing.Controller;
1312

1413
/**
@@ -33,25 +32,20 @@ public synchronized void shouldStart() {
3332
}
3433

3534
public synchronized void start(boolean startEventProcessor) {
36-
ExecutorServiceManager.executeAndWaitForCompletion(
37-
() -> controllers().parallelStream().forEach(c -> c.start(startEventProcessor)),
38-
"ControllerStart");
35+
controllers().parallelStream().forEach(c -> c.start(startEventProcessor));
3936
started = true;
4037
}
4138

4239
public synchronized void stop() {
43-
ExecutorServiceManager.executeAndWaitForCompletion(
44-
() -> controllers().parallelStream().forEach(closeable -> {
45-
log.debug("closing {}", closeable);
46-
closeable.stop();
47-
}), "ControllerStop");
40+
controllers().parallelStream().forEach(closeable -> {
41+
log.debug("closing {}", closeable);
42+
closeable.stop();
43+
});
4844
started = false;
4945
}
5046

5147
public synchronized void startEventProcessing() {
52-
ExecutorServiceManager.executeAndWaitForCompletion(
53-
() -> controllers().parallelStream().forEach(Controller::startEventProcessing),
54-
"ControllerEventProcessing");
48+
controllers().parallelStream().forEach(Controller::startEventProcessing);
5549
}
5650

5751
@SuppressWarnings({"unchecked", "rawtypes"})

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/Controller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ public void changeNamespaces(Set<String> namespaces) {
360360
}
361361

362362
public synchronized void startEventProcessing() {
363-
log.info("Started event processing for controller: {}", configuration.getName());
364363
eventProcessor.start();
364+
log.info("Started event processing for controller: {}", configuration.getName());
365365
}
366366

367367
private void throwMissingCRDException(String crdName, String specVersion, String controllerName) {

0 commit comments

Comments
 (0)