Zakelly commented on code in PR #26392:
URL: https://github.com/apache/flink/pull/26392#discussion_r2026310405


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/snapshot/ForStNativeFullSnapshotStrategy.java:
##########
@@ -152,12 +153,14 @@ public ForStNativeSnapshotResources 
syncPrepareResources(long checkpointId) thro
         final PreviousSnapshot previousSnapshot =
                 snapshotMetaData(checkpointId, stateMetaInfoSnapshots);
 
-        // Disable file deletion for file transformation. ForSt will decide 
whether to allow file
-        // deletion based on the number of calls to disableFileDeletions() and
-        // enableFileDeletions(), so disableFileDeletions() should be call 
only once.
-        db.disableFileDeletions();
+        try (ResourceGuard.Lease ignoredLease = 
resourceGuard.acquireResource()) {

Review Comment:
   I'd suggest we acquire lease here, and release this one after the snapshot 
finished (below `enableFileDeletions `).



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