fix: close Files.walk stream in GitVersionControlLocalFileStorage.del…#5582
fix: close Files.walk stream in GitVersionControlLocalFileStorage.del…#5582LakshyaMalik18 wants to merge 1 commit into
Conversation
|
👋 Thanks for your first contribution to Texera, @LakshyaMalik18! You can drive common housekeeping tasks just by leaving a comment. Type the command on its own line. On issues
To find unclaimed work, search Linking sub-issues
You can write references as On pull requests (author only)
You can mention teams as
For the full contribution flow, see CONTRIBUTING.md. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5582 +/- ##
============================================
+ Coverage 52.17% 52.19% +0.01%
- Complexity 2482 2485 +3
============================================
Files 1068 1068
Lines 41311 41312 +1
Branches 4439 4439
============================================
+ Hits 21556 21561 +5
+ Misses 18490 18488 -2
+ Partials 1265 1263 -2
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Closing this as a duplicate of #5575. |
What changes were proposed in this PR?
GitVersionControlLocalFileStorage.deleteRepocalledFiles.walk(...)without closing the returned stream.Files.walkreturns a closeableStreambacked by an open directory handle, so the handle leaked until GC — which can flake temp-dir deletion on Windows and leak file descriptors on long-lived JVMs.This PR wraps the walk in a try-with-resources block so the stream (and its underlying directory handle) is always closed, even if iteration throws. No behavior change for callers.
Any related issues, documentation, discussions?
Closes #5548
How was this PR tested?
No new tests added. This is a stream-lifecycle fix with no behavior change; existing dataset deletion paths already exercise
deleteRepo.Was this PR authored or co-authored using generative AI tooling?
The code change was taken from the fix described in issue #5548. The PR description was drafted with assistance from Claude (Anthropic).
Generated-by: Claude (Anthropic)