JingsongLi commented on code in PR #7715:
URL: https://github.com/apache/paimon/pull/7715#discussion_r4284442266
##########
paimon-core/src/main/java/org/apache/paimon/operation/OrphanFilesClean.java:
##########
@@ -243,22 +243,26 @@ protected boolean isManagedBlobPack(Path path) {
return
path.getName().endsWith(ManagedBlobReferenceFile.MANAGED_BLOB_SUFFIX);
}
- protected Set<Snapshot> safelyGetAllSnapshots(String branch) throws
IOException {
+ protected Set<Snapshot> safelyGetLiveSnapshots(String branch) throws
IOException {
FileStoreTable branchTable = table.switchToBranch(branch);
- SnapshotManager snapshotManager = branchTable.snapshotManager();
- ChangelogManager changelogManager = branchTable.changelogManager();
- TagManager tagManager = branchTable.tagManager();
- Set<Snapshot> readSnapshots = new
HashSet<>(snapshotManager.safelyGetAllSnapshots());
- readSnapshots.addAll(tagManager.taggedSnapshots());
- readSnapshots.addAll(changelogManager.safelyGetAllChangelogs());
- return readSnapshots;
+ return new
HashSet<>(branchTable.snapshotManager().safelyGetAllSnapshots());
Review Comment:
Verified fixed on 09a86e0217. I independently ran the normal
core/Flink/Spark cleanup suites (54 tests), then used real main/branch commits
and snapshot expiration to trigger both list/read and
captured-live/manifest-read races. Enumeration rejects the changed latest;
missing live manifests abort deletion, and live data plus orphan candidates
remain. Stable-history and zero-snapshot cleanup controls also pass. Spark
cache-loss/recomputation additionally passed with parallelism 5 under
sort-merge (AQE off/on) and broadcast joins: all old candidates survive and all
30 live rows remain readable. No remaining finding in these reviewed paths;
resolving this thread.
--
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]