HBASE-21042 processor.getRowsToLock() always assumes there is some row being locked in HRegion#processRowsWithLocks

This commit is contained in:
tedyu 2018-08-18 11:47:23 -07:00
parent 56c59f11e3
commit e2974f4b91
1 changed files with 3 additions and 2 deletions

View File

@ -7594,8 +7594,9 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
// different. Make them all share same code!
if (!mutations.isEmpty() && !walSyncSuccessful) {
LOG.warn("Wal sync failed. Roll back " + mutations.size() +
" memstore keyvalues for row(s):" + StringUtils.byteToHexString(
processor.getRowsToLock().iterator().next()) + "...");
" memstore keyvalues" + (processor.getRowsToLock().isEmpty() ? "" :
(" for row(s):" + StringUtils.byteToHexString(
processor.getRowsToLock().iterator().next()) + "...")));
for (Mutation m : mutations) {
for (CellScanner cellScanner = m.cellScanner(); cellScanner.advance();) {
Cell cell = cellScanner.current();