RocMarshal commented on code in PR #865: URL: https://github.com/apache/flink-kubernetes-operator/pull/865#discussion_r1716442200
########## 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: Yes, Thanks for the clarify. I see. At present, it might not be the right time to adhere to such strict conventions. So, pls let's introduce the `close` for `eventHandler` only, and maintain intuitive semantics and concise changes. ########## 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: sorry & thank for the catching. updated. ########## flink-autoscaler-plugin-jdbc/src/main/java/org/apache/flink/autoscaler/jdbc/event/JdbcEventInteractor.java: ########## @@ -152,4 +154,49 @@ protected List<AutoScalerEvent> queryEvents(String jobKey, String reason) throws void setClock(@Nonnull Clock clock) { this.clock = Preconditions.checkNotNull(clock); } + + @Nullable + ExpiredEventsResult queryExpiredEventsAndMaxId(Duration eventHandlerTtl) throws Exception { Review Comment: Nice idea. added. -- 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