rdhabalia opened a new pull request #3127:
URL: https://github.com/apache/bookkeeper/pull/3127


   ### Motivation
   
   When Bookie sanity and autoreovery use the same conf file which has flag 
`reorderReadSequenceEnabled=true` then bookie-sanity command throws NPE as 
`LocalBookieEnsemblePlacementPolicy::reorderReadLACSequence` returns null 
writesets which causes the sanity failure.
   
   ```
   00:46:46.202 [BookKeeperClientWorker-OrderedExecutor-11-0] ERROR 
o.a.b.common.util.SafeRunnable       - Unexpected throwable caught 
   java.lang.NullPointerException: null
        at 
org.apache.bookkeeper.client.PendingReadOp$SequenceReadRequest.sendNextRead(PendingReadOp.java:399)
        at 
org.apache.bookkeeper.client.PendingReadOp$SequenceReadRequest.read(PendingReadOp.java:385)
        at 
org.apache.bookkeeper.client.PendingReadOp.initiate(PendingReadOp.java:529)
        at 
org.apache.bookkeeper.client.LedgerRecoveryOp.doRecoveryRead(LedgerRecoveryOp.java:148)
        at 
org.apache.bookkeeper.client.LedgerRecoveryOp.access$000(LedgerRecoveryOp.java:37)
        at 
org.apache.bookkeeper.client.LedgerRecoveryOp$1.readLastConfirmedDataComplete(LedgerRecoveryOp.java:109)
        at 
org.apache.bookkeeper.client.ReadLastConfirmedOp.readEntryComplete(ReadLastConfirmedOp.java:135)
        at 
org.apache.bookkeeper.proto.PerChannelBookieClient$ReadCompletion$1.readEntryComplete(PerChannelBookieClient.java:1829)
        at 
org.apache.bookkeeper.proto.PerChannelBookieClient$ReadCompletion.handleReadResponse(PerChannelBookieClient.java:1910)
        at 
org.apache.bookkeeper.proto.PerChannelBookieClient$ReadCompletion.handleV3Response(PerChannelBookieClient.java:1885)
        at 
org.apache.bookkeeper.proto.PerChannelBookieClient$3.safeRun(PerChannelBookieClient.java:1446)
        at 
org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
   
   ```
   
   ### Modification
   Fix NPE for local ensemble policy while reading entry with 
`reorderReadSequenceEnabled` flag enabled.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to