adutra commented on code in PR #4616:
URL: https://github.com/apache/polaris/pull/4616#discussion_r3357420745
##########
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:
That was actually my first implementation, but it felt like highjacking the
executor. Also we have different execution profiles: a task is typically
long-lived, but we don't expect thousands of tasks per second; an event
delivery OTOH should complete quickly, but we must expect a potentially high
number of events per second.
##########
runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventListeners.java:
##########
@@ -79,9 +84,24 @@ public void onStartup(@Observes StartupEvent event) {
private void deliverEvent(
PolarisEvent event, String listenerName, PolarisEventListener listener) {
- LOGGER.debug("Delivering {} event to listener '{}' ({})", event.type(),
listenerName, listener);
Review Comment:
Sorry that wasn't intentional 😅
--
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]