dmvk commented on a change in pull request #18169:
URL: https://github.com/apache/flink/pull/18169#discussion_r785741977



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/TaskExecutorStateChangelogStoragesManager.java
##########
@@ -124,10 +125,9 @@ public void releaseStateChangelogStorageForJob(@Nonnull 
JobID jobId) {
     }
 
     public void shutdown() {
-        if (closed) {
+        if (closed.getAndSet(true)) {
             return;
         }
-        closed = true;
 
         HashMap<JobID, Optional<StateChangelogStorage<?>>> toRelease =

Review comment:
       Hmm, shutdown code path here doesn't seems to be thread safe, which is 
required for shutdown hooks to work properly.
   
   We should create a follow up issues for this.
   
   cc @rkhachatryan @Zakelly 




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