dimas-b commented on code in PR #4616:
URL: https://github.com/apache/polaris/pull/4616#discussion_r3357572877
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -459,4 +461,27 @@ public PolarisMetricsReporter metricsReporter(
MetricsReportingConfiguration config, @Any
Instance<PolarisMetricsReporter> reporters) {
return reporters.select(Identifier.Literal.of(config.type())).get();
}
+
+ @Produces
+ @Singleton
+ @Identifier("event-listener-executor")
+ public Executor eventListenerExecutor(PolarisEventListenerConfiguration
config) {
+ if (config.types().isEmpty()) {
+ return r -> {};
+ }
+ return SmallRyeManagedExecutor.builder()
+ .injectionPointName("event-listener-executor")
Review Comment:
Good points!
I'm still worried a bit with the proliferation of thread pools. Eventually
the execution will be bound by the number of CPU cores anyway, but each thread
has stack overhead :thinking:
I guess we can leave this for future improvements, though... This change in
itself makes sense :+1:
--
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]