HBASE-15425 Failing to write bulk load event marker in the WAL is ignored (Ashish Singhi)

This commit is contained in:
tedyu 2016-03-10 07:19:59 -08:00
parent e103f75ae7
commit f82147831b
1 changed files with 5 additions and 2 deletions

View File

@ -5379,6 +5379,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
Preconditions.checkNotNull(familyPaths);
// we need writeLock for multi-family bulk load
startBulkRegionOperation(hasMultipleColumnFamilies(familyPaths));
boolean isSuccessful = false;
try {
this.writeRequestsCount.increment();
@ -5426,7 +5427,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
// problem when validating
LOG.warn("There was a recoverable bulk load failure likely due to a" +
" split. These (family, HFile) pairs were not loaded: " + list);
return false;
return isSuccessful;
}
// We need to assign a sequential ID that's in between two memstores in order to preserve
@ -5486,7 +5487,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
}
}
return true;
isSuccessful = true;
} finally {
if (wal != null && !storeFiles.isEmpty()) {
// write a bulk load event when not all hfiles are loaded
@ -5500,6 +5501,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
if (this.rsServices != null) {
// Have to abort region server because some hfiles has been loaded but we can't write
// the event into WAL
isSuccessful = false;
this.rsServices.abort("Failed to write bulk load event into WAL.", ioe);
}
}
@ -5507,6 +5509,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
closeBulkRegionOperation();
}
return isSuccessful;
}
@Override