HBASE-1045 Hangup by regionserver causes write to fail
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@728460 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a23e45f4b7
commit
80eb7de81d
|
@ -111,6 +111,7 @@ Release 0.19.0 - Unreleased
|
|||
HBASE-1068 TestCompaction broken on hudson
|
||||
HBASE-1067 TestRegionRebalancing broken by running of hdfs shutdown thread
|
||||
HBASE-1070 Up default index interval in TRUNK and branch
|
||||
HBASE-1045 Hangup by regionserver causes write to fail
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-901 Add a limit to key length, check key and value length on client side
|
||||
|
|
|
@ -880,9 +880,6 @@ public class HConnectionManager implements HConstants {
|
|||
if (t instanceof DoNotRetryIOException) {
|
||||
throw (DoNotRetryIOException) t;
|
||||
}
|
||||
if (t instanceof IOException) {
|
||||
throw (IOException) t;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -893,6 +890,7 @@ public class HConnectionManager implements HConstants {
|
|||
if (list.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
boolean retryOnlyOne = false;
|
||||
Collections.sort(list);
|
||||
List<BatchUpdate> tempUpdates = new ArrayList<BatchUpdate>();
|
||||
byte[] currentRegion = getRegionLocation(tableName, list.get(0).getRow(),
|
||||
|
@ -908,7 +906,7 @@ public class HConnectionManager implements HConstants {
|
|||
region = getRegionLocation(tableName, list.get(i + 1).getRow(), false)
|
||||
.getRegionInfo().getRegionName();
|
||||
}
|
||||
if (!Bytes.equals(currentRegion, region) || isLastRow) {
|
||||
if (!Bytes.equals(currentRegion, region) || isLastRow || retryOnlyOne) {
|
||||
final BatchUpdate[] updates = tempUpdates.toArray(new BatchUpdate[0]);
|
||||
int index = getRegionServerForWithoutRetries(new ServerCallable<Integer>(
|
||||
this, tableName, batchUpdate.getRow()) {
|
||||
|
@ -926,13 +924,10 @@ public class HConnectionManager implements HConstants {
|
|||
}
|
||||
long sleepTime = getPauseTime(tries);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Eeloading table servers because region " +
|
||||
LOG.debug("Reloading table servers because region " +
|
||||
"server didn't accept updates; tries=" + tries +
|
||||
" of max=" + this.numRetries + ", waiting=" + sleepTime + "ms");
|
||||
}
|
||||
// Basic waiting time. If many updates are flushed, tests have shown
|
||||
// that this is barely needed but when commiting 1 update this may
|
||||
// get retried hundreds of times.
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
tries++;
|
||||
|
@ -940,10 +935,14 @@ public class HConnectionManager implements HConstants {
|
|||
// continue
|
||||
}
|
||||
i = i - updates.length + index;
|
||||
retryOnlyOne = true;
|
||||
region = getRegionLocation(tableName, list.get(i + 1).getRow(),
|
||||
true).getRegionInfo().getRegionName();
|
||||
|
||||
}
|
||||
else {
|
||||
retryOnlyOne = false;
|
||||
}
|
||||
currentRegion = region;
|
||||
tempUpdates.clear();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue