Skip to content

Commit

Permalink
HBASE-28598 Fixes NPE for writer object access in AsyncFSWAL#closeWri…
Browse files Browse the repository at this point in the history
…ter (#5907)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
vineet4008 authored May 17, 2024
1 parent 6af1823 commit 17ae116
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,10 @@ protected void doReplaceWriter(Path oldPath, Path newPath, AsyncWriter nextWrite
@Override
protected void doShutdown() throws IOException {
waitForSafePoint();
closeWriter(this.writer, getOldPath());
this.writer = null;
if (this.writer != null) {
closeWriter(this.writer, getOldPath());
this.writer = null;
}
closeExecutor.shutdown();
try {
if (!closeExecutor.awaitTermination(waitOnShutdownInSeconds, TimeUnit.SECONDS)) {
Expand Down

0 comments on commit 17ae116

Please sign in to comment.