This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.4 by this push:
new 2790b60c931 HBASE-28598 Fixes NPE for writer object access in
AsyncFSWAL#closeWriter (#5907)
2790b60c931 is described below
commit 2790b60c931b73605fadd4697ee8ec02b5d00c09
Author: Vineet Kumar Maheshwari <[email protected]>
AuthorDate: Fri May 17 20:04:28 2024 +0530
HBASE-28598 Fixes NPE for writer object access in AsyncFSWAL#closeWriter
(#5907)
Signed-off-by: Duo Zhang <[email protected]>
(cherry picked from commit 17ae116db1ee4d85fda8721b468dd296b3178cf1)
---
.../java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java
index ade8f75a74c..5be8a640b33 100644
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java
@@ -797,8 +797,10 @@ public class AsyncFSWAL extends AbstractFSWAL<AsyncWriter>
{
@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)) {