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 08df28a commit 31436b4
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,14 @@ public void addComplete(int rc, final LedgerHandle lh, long entryId, Object ctx)
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 31436b4

Please sign in to comment.