thswlsqls commented on code in PR #9287:
URL: https://github.com/apache/paimon/pull/9287#discussion_r3810276353
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/service/QueryExecutorOperator.java:
##########
@@ -128,6 +130,10 @@ public void processElement(StreamRecord<InternalRow>
streamRecord) throws Except
@Override
public void close() throws Exception {
super.close();
+ // shut down the server first, so that no in-flight request can hit
the closed query
+ if (server != null) {
+ server.shutdown();
Review Comment:
@ArnavBalyan Thanks for the review. Agreed — `KvQueryServer.shutdown()`
catches `Exception` and only logs a warning, so `close()` proceeds even when
the server didn't actually stop.
`QueryExecutorOperatorTest` in this PR does assert that the published port
refuses connections after `close()`, so the happy path is covered. Surfacing a
failed shutdown changes production behavior, so I'll leave that to a follow-up
as you suggest.
--
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]