This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 17ae116db1e HBASE-28598 Fixes NPE for writer object access in
AsyncFSWAL#closeWriter (#5907)
17ae116db1e is described below
commit 17ae116db1ee4d85fda8721b468dd296b3178cf1
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]>
---
.../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 69d5cba244d..f13160a549a 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
@@ -772,8 +772,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)) {