Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #8405] Add the ability to write ConsumeQueue using fileChannel to prevent JVM crashes in some situations #8403

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

RongtongJin
Copy link
Contributor

@RongtongJin RongtongJin commented Jul 19, 2024

Which Issue(s) This PR Fixes

Fixes #8405

Brief Description

Add the ability to write ConsumeQueue using fileChannel to prevent JVM crashes in some situations

How Did You Test This Change?

@RongtongJin RongtongJin changed the title Add the ability to write ConsumeQueue using fileChannel to prevent JVM crashes in some situations [ISSUE #8405] Add the ability to write ConsumeQueue using fileChannel to prevent JVM crashes in some situations Jul 19, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 51.85185% with 13 lines in your changes missing coverage. Please review.

Project coverage is 45.06%. Comparing base (d9d53d5) to head (2c790b3).

Files Patch % Lines
...n/java/org/apache/rocketmq/store/ConsumeQueue.java 42.85% 2 Missing and 2 partials ⚠️
...ache/rocketmq/store/logfile/DefaultMappedFile.java 60.00% 3 Missing and 1 partial ⚠️
...pache/rocketmq/store/queue/SparseConsumeQueue.java 0.00% 3 Missing ⚠️
...ache/rocketmq/store/config/MessageStoreConfig.java 50.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8403      +/-   ##
=============================================
- Coverage      45.12%   45.06%   -0.06%     
+ Complexity     10931    10923       -8     
=============================================
  Files           1274     1274              
  Lines          88970    88993      +23     
  Branches       11434    11439       +5     
=============================================
- Hits           40144    40106      -38     
- Misses         43826    43876      +50     
- Partials        5000     5011      +11     

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

Copy link
Contributor

@fuyou001 fuyou001 left a comment

Choose a reason for hiding this comment

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

LGMT

@humkum
Copy link
Contributor

humkum commented Jul 19, 2024

How can this prevent JVM crashes? Is it because fileChannel uses off-heap memory?

@RongtongJin
Copy link
Contributor Author

How can this prevent JVM crashes? Is it because fileChannel uses off-heap memory?

yes

@caigy caigy merged commit 86d59d2 into apache:develop Jul 22, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Deleting ConsumeQueue files may cause JVM crashes
6 participants