1996fanrui commented on code in PR #865: URL: https://github.com/apache/flink-kubernetes-operator/pull/865#discussion_r1716291506
########## flink-autoscaler-standalone/src/main/java/org/apache/flink/autoscaler/standalone/config/AutoscalerStandaloneOptions.java: ########## @@ -121,4 +121,11 @@ private static ConfigOptions.OptionBuilder autoscalerStandaloneConfig(String key code(EVENT_HANDLER_TYPE.key()), code("JDBC")) .build()); + + public static final ConfigOption<Duration> JDBC_EVENT_HANDLER_TTL = + autoscalerStandaloneConfig("jdbc-event-handler.ttl") Review Comment: how about `jdbc.event-handler.ttl`? Other options are `jdbc.xxx`. ########## flink-autoscaler-standalone/src/main/java/org/apache/flink/autoscaler/standalone/StandaloneAutoscalerExecutor.java: ########## @@ -113,6 +113,8 @@ public void start() { public void close() { scheduledExecutorService.shutdownNow(); scalingThreadPool.shutdownNow(); + autoScaler.close(); + eventHandler.close(); Review Comment: IIUC, `eventHandler.close()` is called twice. We don't need to introduce the close for `autoScaler`, because we could close eventHandler directly. ########## flink-autoscaler-standalone/src/main/java/org/apache/flink/autoscaler/standalone/AutoscalerEventHandlerFactory.java: ########## @@ -73,6 +75,6 @@ AutoScalerEventHandler<KEY, Context> create(Configuration conf) throws Exception AutoScalerEventHandler<KEY, Context> createJdbcEventHandler(Configuration conf) throws Exception { var conn = HikariJDBCUtil.getConnection(conf); - return new JdbcAutoScalerEventHandler<>(new JdbcEventInteractor(conn)); + return new JdbcAutoScalerEventHandler<>(new JdbcEventInteractor(conn), Duration.ZERO); Review Comment: Why don't get `JDBC_EVENT_HANDLER_TTL` from conf? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org