Describe the bug
NPE occurs in the method ManagedLedgerImpl.isOffloadedNeedsDelete .
To Reproduce
Steps to reproduce the behavior:
- Use the offloader feature.
Error Log
[bookkeeper-ml-workers-OrderedExecutor-0-0] ERROR org.apache.bookkeeper.common.util.SafeRunnable - Unexpected throwable caught
java.lang.NullPointerException: null
at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.isOffloadedNeedsDelete(ManagedLedgerImpl.java:1968) ~[org.apache.pulsar-managed-ledger-2.6.0-sn-candidate-2.jar:2.6.0-sn-candidate-2]
at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.internalTrimConsumedLedgers(ManagedLedgerImpl.java:2050) ~[org.apache.pulsar-managed-ledger-2.6.0-sn-candidate-2.jar:2.6.0-sn-candidate-2]
at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.lambda$trimConsumedLedgersInBackground$20(ManagedLedgerImpl.java:1875) ~[org.apache.pulsar-managed-ledger-2.6.0-sn-candidate-2.jar:2.6.0-sn-candidate-2]
at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) ~[org.apache.pulsar-managed-ledger-2.6.0-sn-candidate-2.jar:2.6.0-sn-candidate-2]
at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.10.0.jar:4.10.0]
at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.10.0.jar:4.10.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.48.Final.jar:4.1.48.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Expected behavior
We should make NPE check and avoid the NPE appears.
Desktop (please complete the following information):
Describe the bug
NPE occurs in the method
ManagedLedgerImpl.isOffloadedNeedsDelete.To Reproduce
Steps to reproduce the behavior:
Error Log
Expected behavior
We should make NPE check and avoid the NPE appears.
Desktop (please complete the following information):