Skip to content

Fix resource leak in IndexStoreFile shutdown#9840

Merged
ShannonDing merged 4 commits intoapache:developfrom
RongtongJin:dev-1111
Nov 14, 2025
Merged

Fix resource leak in IndexStoreFile shutdown#9840
ShannonDing merged 4 commits intoapache:developfrom
RongtongJin:dev-1111

Conversation

@RongtongJin
Copy link
Copy Markdown
Contributor

@RongtongJin RongtongJin commented Nov 11, 2025

Which Issue(s) This PR Fixes

Fixes #issue_id

Brief Description

Add cleanResources() calls after shutdown() for both mappedFile and compactMappedFile to ensure proper cleanup of memory-mapped buffers and file channels.

How Did You Test This Change?

RongtongJin added 3 commits November 11, 2025 17:35
Add cleanResources() calls after shutdown() for both mappedFile and compactMappedFile to ensure proper cleanup of memory-mapped buffers and file channels.

Change-Id: I2716b4e3b0cd281e89a9d5a00a389dc6048de3e7
Co-developed-by: Cursor <noreply@cursor.com>
…fter shutdown

Change-Id: Icc0063544ef91de8b2bd96a80f3829a6922cb0e6
…fter shutdown.

Change-Id: I53a7d2800775d80c1db8feb159c5c258b3517f09
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.28%. Comparing base (2017630) to head (e78e2a7).
⚠️ Report is 131 commits behind head on develop.

Files with missing lines Patch % Lines
...che/rocketmq/tieredstore/index/IndexStoreFile.java 40.00% 3 Missing ⚠️
.../rocketmq/tieredstore/index/IndexStoreService.java 75.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #9840      +/-   ##
=============================================
- Coverage      48.38%   48.28%   -0.11%     
+ Complexity     12276    12248      -28     
=============================================
  Files           1314     1314              
  Lines          93858    93864       +6     
  Branches       12043    12043              
=============================================
- Hits           45415    45324      -91     
- Misses         42836    42915      +79     
- Partials        5607     5625      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

fuyou001
fuyou001 previously approved these changes Nov 12, 2025
Change-Id: I21cc78101a31e80bcf9a98165c267f1568444f1b
Copy link
Copy Markdown
Member

@ShannonDing ShannonDing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShannonDing ShannonDing merged commit 69e2524 into apache:develop Nov 14, 2025
17 of 21 checks passed
@RongtongJin RongtongJin added the ha label Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants