hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r728460 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Date Sun, 21 Dec 2008 17:08:44 GMT
Author: jdcryans
Date: Sun Dec 21 09:08:44 2008
New Revision: 728460

URL: http://svn.apache.org/viewvc?rev=728460&view=rev
Log:
HBASE-1045  Hangup by regionserver causes write to fail

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=728460&r1=728459&r2=728460&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Sun Dec 21 09:08:44 2008
@@ -111,6 +111,7 @@
    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

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=728460&r1=728459&r2=728460&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java Sun
Dec 21 09:08:44 2008
@@ -880,9 +880,6 @@
         if (t instanceof DoNotRetryIOException) {
           throw (DoNotRetryIOException) t;
         }
-        if (t instanceof IOException) {
-          throw (IOException) t;
-        }
       }
       return null;    
     }
@@ -893,6 +890,7 @@
       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 @@
           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 @@
             }
             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,9 +935,13 @@
               // 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();



Mime
View raw message