Repository navigation
Fix read lock leak in disk usage statistics - #18807
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18807 +/- ##
============================================
- Coverage 45.59% 45.59% -0.01%
Complexity 712 712
============================================
Files 5496 5496
Lines 396800 396799 -1
Branches 51621 51621
============================================
- Hits 180929 180908 -21
- Misses 215871 215891 +20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JackieTien97
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Disk usage statistics acquire a resource read lock when collecting files and acquire another when registering a reader reference for scanning. After scanning, only one lock is released and the file is removed from the cleanup queue, leaving a read lock held even after the statistics utility is closed.
Register one
FileReaderManagerreference when collecting each closed file, and consistently release it throughdecreaseFileReaderReference()when skipping a file, finishing a scan, or cleaning up remaining files. Remove the duplicate reference registration before scanning. This balances reader references and resource read locks for both tree-model and table-model disk usage statistics.Validation
FileReaderManagerimplementation.Key changed classes
DiskUsageStatisticUtil