tsreaper commented on a change in pull request #56:
URL: https://github.com/apache/flink-table-store/pull/56#discussion_r834059387
##########
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:
Yes, but this will have no impact on the file content and in the
meantime make the logic here more simple.
--
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]