HBASE-17475 Stack overflow in AsyncProcess if retry too much
Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
parent
354e213852
commit
2b5292c5f9
|
@ -1106,8 +1106,11 @@ class AsyncProcess {
|
|||
}
|
||||
|
||||
// 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 {
|
||||
|
|
Loading…
Reference in New Issue