vigneshio opened a new pull request, #4828: URL: https://github.com/apache/polaris/pull/4828
Fix ManifestReader resource leak in ManifestFileCleanupTaskHandler ManifestReader<DataFile> is created using ManifestFiles.read(...) in cleanUpManifestFile() but is never closed. Since ManifestReader implements Closeable, it should be closed after use. Leaving it open can cause file handle leaks, especially when many cleanup tasks run concurrently, eventually leading to "Too many open files" errors. This change wraps the reader in a try-with-resources block to ensure it is always closed after processing, including handling any IOException raised during close(). ## Checklist - [ ] Don't disclose security issues! (contact [email protected]) - [x] Clearly explained why the changes are needed, or linked related issues - [ ] 🧪 Added/updated tests with good coverage, or manually tested (and explained how) -- existing higher-level tests + manual verification of close behavior - [x] Added comments for complex logic - [ ] 🧾 Updated CHANGELOG.md (if needed) -- internal robustness fix - [ ] Updated documentation in site/content/in-dev/unreleased (if needed) -- 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]
