Skip to content

Commit

Permalink
attempt to fix NPE in NodeImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
alievmirza committed Sep 24, 2024
1 parent 494f868 commit 1b2cea2
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,19 @@ public LogId getLastLogId(final boolean isFlush) {
Thread.currentThread().interrupt();
throw new IllegalStateException(e);
}
if (c.lastLogId == null) {
assert stopped;

try {
shutDownLatch.await();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();

throw new IllegalStateException(e);
}

return new LogId(this.lastLogIndex, unsafeGetTerm(this.lastLogIndex));
}
return c.lastLogId;
}

Expand Down

0 comments on commit 1b2cea2

Please sign in to comment.