Skip to content

Commit

Permalink
unload bundle causes topic fence, OpAddEntry NPE appears in addComple…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoliang01 committed Sep 23, 2022
1 parent a5722e3 commit 7ca72d2
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,13 @@ public void addComplete(int rc, final LedgerHandle lh, long entryId, Object ctx)
return;
}

if(ledger == null){
return;
}

if (ledger.getId() != lh.getId()) {
log.warn("[{}] ledgerId {} doesn't match with acked ledgerId {}", ml.getName(), ledger.getId(), lh.getId());
if(ledger != null) {
if (ledger.getId() != lh.getId()) {
log.warn("[{}] ledgerId {} doesn't match with acked ledgerId {}", ml.getName(), ledger.getId(), lh.getId());
}
checkArgument(ledger.getId() == lh.getId(), "ledgerId %s doesn't match with acked ledgerId %s", ledger.getId(),
lh.getId());
}
checkArgument(ledger.getId() == lh.getId(), "ledgerId %s doesn't match with acked ledgerId %s", ledger.getId(),
lh.getId());

if (!checkAndCompleteOp(ctx)) {
// means callback might have been completed by different thread (timeout task thread).. so do nothing
Expand Down

0 comments on commit 7ca72d2

Please sign in to comment.