HBASE-19593 Possible NPE if wal is closed during waledit append.(Rajeshabbu)

This commit is contained in:
Rajeshbabu Chintaguntla 2017-12-22 17:21:30 +05:30
parent d4af099e9e
commit 79d4f6c11c
1 changed files with 1 additions and 1 deletions

View File

@ -7585,7 +7585,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
} }
writeEntry = walKey.getWriteEntry(); writeEntry = walKey.getWriteEntry();
} catch (IOException ioe) { } catch (IOException ioe) {
if (walKey != null) { if (walKey != null && walKey.getWriteEntry() != null) {
mvcc.complete(walKey.getWriteEntry()); mvcc.complete(walKey.getWriteEntry());
} }
throw ioe; throw ioe;