weiqingy commented on code in PR #548:
URL: https://github.com/apache/flink-agents/pull/548#discussion_r2909507191


##########
runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java:
##########
@@ -723,8 +731,8 @@ public void close() throws Exception {
         if (actionStateStore != null) {
             actionStateStore.close();
         }
-        if (runnerContext != null) {
-            runnerContext.close();
+        if (resourceCache != null) {
+            resourceCache.close();

Review Comment:
   @wenjin272 Thanks for the thorough review and for catching the close() 
ordering issue! Applied your fix — moved resourceCache.close() to the top of 
ActionExecutionOperator.close(), before pythonInterpreter.close(). Added a 
comment explaining the ordering constraint so it doesn't get accidentally 
re-ordered in the future.     



##########
runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java:
##########
@@ -723,8 +731,8 @@ public void close() throws Exception {
         if (actionStateStore != null) {
             actionStateStore.close();
         }
-        if (runnerContext != null) {
-            runnerContext.close();
+        if (resourceCache != null) {
+            resourceCache.close();

Review Comment:
   @wenjin272 Thanks for the review and for catching the close() ordering 
issue! Applied your fix — moved resourceCache.close() to the top of 
ActionExecutionOperator.close(), before pythonInterpreter.close(). Added a 
comment explaining the ordering constraint so it doesn't get accidentally 
re-ordered in the future.     



-- 
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]

Reply via email to