JingsongLi commented on a change in pull request #56:
URL: https://github.com/apache/flink-table-store/pull/56#discussion_r833185350



##########
File path: 
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/operation/FileStoreExpireImpl.java
##########
@@ -101,18 +120,28 @@ public void expire() {
         }
 
         // no snapshot can be retained, expire all but last one
-        expireUntil(latestSnapshotId);
+        expireUntil(earliest, latestSnapshotId);
     }
 
-    private void expireUntil(long endExclusiveId) {
-        if (endExclusiveId <= Snapshot.FIRST_SNAPSHOT_ID) {
+    private void expireUntil(long earliestId, long endExclusiveId) {
+        if (endExclusiveId <= earliestId) {
+            // write hint file if not exists
+            Path hint = new Path(pathFactory.snapshotDirectory(), 
SnapshotFinder.EARLIEST);
+            try {
+                if (!hint.getFileSystem().exists(hint)) {

Review comment:
       If it happens to be after the deletion before the renaming, then a job 
comes to read the data, it will see that there is no hint file




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