Re: NPE in pendingAddOp

2021-02-16 Thread Andrey Yegorov
sure, unless some other corner case of Op completion is missing. Doing something along the lines of the code below will add some visibility into that: void timeoutQuorumWait() { try { if(!completed) final LedgerHandle cached = lh; clientCtx.getMainWorkerPool().executeOrdered(lh.ledgerId, new SafeR

Re: NPE in pendingAddOp

2021-02-16 Thread Venkateswara Rao Jujjuri
But post recycle should not result in this scenario as I mentioned in my comment. On Tue, Feb 16, 2021 at 2:49 PM Andrey Yegorov wrote: > Simple check for null won't prevent timing out wrong (post recycle/reuse) > handle. > > > On Tue, Feb 16, 2021 at 14:38 Venkateswara Rao Jujjuri > wrote: > >

Re: NPE in pendingAddOp

2021-02-16 Thread Andrey Yegorov
Simple check for null won't prevent timing out wrong (post recycle/reuse) handle. On Tue, Feb 16, 2021 at 14:38 Venkateswara Rao Jujjuri wrote: > Yes; That is exactly how my theory is and the fix is also the same. But > still looking into how we could get into it. > > // If the object is recycl

Re: NPE in pendingAddOp

2021-02-16 Thread Venkateswara Rao Jujjuri
Yes; That is exactly how my theory is and the fix is also the same. But still looking into how we could get into it. // If the object is recycled while this task is on the queue lh could get null. // monitorPendingAddOps() can't schedule after recycling because // time timed out pendingAddOp won't

Re: NPE in pendingAddOp

2021-02-16 Thread Andrey Yegorov
This could happen if PendingAddOp got recycled (and set lh to null) before the runnable submitted by timeoutQuorumWait had a chance to run. I don't know how it got into this state but if is easy to miss if recycled object gets reused quickly - timeout will fail wrong ledger. The right thing to do

Re: NPE in pendingAddOp

2021-02-16 Thread Enrico Olivelli
Sorry I never seen that error Enrico Il giorno mar 16 feb 2021 alle ore 19:50 Venkateswara Rao Jujjuri < jujj...@gmail.com> ha scritto: > Ignore my comment about different thread, I see that timeoutQuorumWait() is > run through OSE. > But we did NPE in this line > < > https://github.com/apache/b

Re: NPE in pendingAddOp

2021-02-16 Thread Venkateswara Rao Jujjuri
Ignore my comment about different thread, I see that timeoutQuorumWait() is run through OSE. But we did NPE in this line . In this run, we have disabled ensemble cha