heye1005 opened a new pull request, #7715: URL: https://github.com/apache/paimon/pull/7715
### Purpose Fix #7710. `LocalOrphanFilesClean.clean()` collects used files by reading all snapshots via `safelyGetAllSnapshots()`. However, this method silently catches `FileNotFoundException` — if concurrent snapshot expiration deletes all snapshots between listing and reading, `usedFiles` ends up empty, and all candidate data files get deleted as orphans. This patch skips orphan file deletion when `usedFiles` is empty to prevent accidental data loss. ### Tests Added `LocalOrphanFilesCleanTest#testSkipCleaningWhenAllSnapshotsDeleted`. -- 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]
