HBASE-18309 (addendum) fix NPE in LogCleaner

This commit is contained in:
Chia-Ping Tsai 2017-12-17 17:05:12 +08:00
parent 979767824d
commit 988ea870ed
1 changed files with 3 additions and 1 deletions

View File

@ -163,7 +163,9 @@ public class LogCleaner extends CleanerChore<BaseLogCleanerDelegate> {
LOG.warn("Failed to clean oldwals with exception: " + e); LOG.warn("Failed to clean oldwals with exception: " + e);
succeed = false; succeed = false;
} finally { } finally {
if (context != null) {
context.setResult(succeed); context.setResult(succeed);
}
if (interrupted) { if (interrupted) {
// Restore interrupt status // Restore interrupt status
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();