HBASE-15425 Failing to write bulk load event marker in the WAL is ignored (Ashish Singhi)
This commit is contained in:
parent
97cce850fe
commit
d14b6c3810
|
@ -5297,6 +5297,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();
|
||||
|
||||
|
@ -5344,7 +5345,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
|
||||
|
@ -5404,10 +5405,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
|||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
isSuccessful = true;
|
||||
} finally {
|
||||
if (wal != null && !storeFiles.isEmpty()) {
|
||||
// @rite a bulk load event when not all hfiles are loaded
|
||||
// Write a bulk load event for hfiles that are loaded
|
||||
try {
|
||||
WALProtos.BulkLoadDescriptor loadDescriptor = ProtobufUtil.toBulkLoadDescriptor(
|
||||
this.getRegionInfo().getTable(),
|
||||
|
@ -5418,6 +5419,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);
|
||||
}
|
||||
}
|
||||
|
@ -5425,6 +5427,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
|||
|
||||
closeBulkRegionOperation();
|
||||
}
|
||||
return isSuccessful;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue