Repository navigation
fix npe in handleAddFailure - #14606
Closed
lordcheng10 wants to merge 1 commit into
Closed
lordcheng10 wants to merge 1 commit into
lordcheng10 wants to merge 1 commit into
Conversation
lhotari
requested changes
Mar 8, 2022
| // Force the creation of a new ledger. Doing it in a background thread to avoid acquiring ML lock | ||
| // from a BK callback. | ||
| finalMl.ledgerClosed(lh); | ||
| if (finalMl != null) { |
Member
There was a problem hiding this comment.
how can finalMl ever be null? Wouldn't finalMl.getName() also fail?
Member
There was a problem hiding this comment.
This looks like a thread safety issue again where the solution isn't to suppress the NPE.
Member
There was a problem hiding this comment.
or perhaps #12103 already fixed the issue and you are running a version without that fix? @lordcheng10 can you confirm if you have changes for #12103?
Member
There was a problem hiding this comment.
Member
|
Closing since this issue is already fixed by #12103 |
Contributor
Author
OK |
2 of 3 tasks
3 tasks done
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.
Motivation
The npe was found in the broker log, the log is as follows:
3:29:20.111 [BookKeeperClientWorker-OrderedExecutor-37-0] ERROR org.apache.bookkeeper.common.util.SafeRunnable - Unexpected throwable caught
java.lang.NullPointerException: null
at org.apache.bookkeeper.mledger.impl.OpAddEntry.lambda$handleAddFailure$0(OpAddEntry.java:291) ~[org.apache.pulsar-managed-ledger-2.8.1.2.jar:2.8.1.2]
at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) ~[org.apache.pulsar-managed-ledger-2.8.1.2.jar:2.8.1.2]
at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.14.2.jar:4.14.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.66.Final.jar:4.1.66.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Documentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
doc-required(If you need help on updating docs, create a doc issue)
no-need-doc(Please explain why)
doc(If this PR contains doc changes)