hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject hbase git commit: HBASE-17475 Stack overflow in AsyncProcess if retry too much
Date Tue, 17 Jan 2017 07:53:52 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 4ab95ebbc -> 9b38c1a33


HBASE-17475 Stack overflow in AsyncProcess if retry too much

Signed-off-by: zhangduo <zhangduo@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9b38c1a3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9b38c1a3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9b38c1a3

Branch: refs/heads/master
Commit: 9b38c1a33ce1a7ee41cb14980b3b74e317d30b78
Parents: 4ab95eb
Author: Allan Yang <allanwin@163.com>
Authored: Tue Jan 17 15:45:48 2017 +0800
Committer: zhangduo <zhangduo@apache.org>
Committed: Tue Jan 17 15:45:48 2017 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9b38c1a3/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
index 036196e..b0a2798 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
@@ -42,6 +42,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.CallQueueTooBigException;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HRegionLocation;
 import org.apache.hadoop.hbase.RegionLocations;
@@ -567,8 +568,11 @@ class AsyncRequestFutureImpl<CResult> implements AsyncRequestFuture
{
       }
 
       // run all the runnables
+      // HBASE-17475: Do not reuse the thread after stack reach a certain depth to prevent
stack overflow
+      // for now, we use HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER to control the depth
       for (Runnable runnable : runnables) {
-        if ((--actionsRemaining == 0) && reuseThread) {
+        if ((--actionsRemaining == 0) && reuseThread
+            && numAttempt % HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER != 0)
{
           runnable.run();
         } else {
           try {


Mime
View raw message