-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][broker] Fix incomplete NAR file extraction which prevents broker from starting #23274
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow a different approach where a temp directory is used which is then renamed instead of using a "success file". Example: lhotari@07b2151
@nikhilerigila09 Are there any challenges in following the advice to use file renaming instead of using a "success file"? |
3c77137
to
8e21042
Compare
pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
Outdated
Show resolved
Hide resolved
pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
Outdated
Show resolved
Hide resolved
pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good work @nikhilerigila09
This could also impact Pulsar Functions or |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23274 +/- ##
============================================
- Coverage 73.57% 73.53% -0.05%
- Complexity 32624 34556 +1932
============================================
Files 1877 1929 +52
Lines 139502 154539 +15037
Branches 15299 18024 +2725
============================================
+ Hits 102638 113634 +10996
- Misses 28908 32222 +3314
- Partials 7956 8683 +727
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…r from starting (apache#23274) (cherry picked from commit 03330b3)
…r from starting (apache#23274) (cherry picked from commit 03330b3)
Fixes 23273
Motivation
This PR addresses an issue where the Pulsar broker fails to restart due to incomplete NAR file extraction. The broker attempts to reuse an incomplete directory in the
/tmp
folder, leading to aNoSuchFileException
. This occurs when the broker is stopped during the extraction process, causing the NAR files to remain in an inconsistent state, which affects future restarts.Modifications
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: cognitree#15