Skip to content
Permalink
Browse files
Address comments
  • Loading branch information
tisonkun committed May 7, 2020
1 parent 04affff commit c32599670667e6c3f9b9773d3415e3b57b551fd0
Showing 2 changed files with 2 additions and 4 deletions.
@@ -52,8 +52,7 @@ default boolean allowRetry(Throwable exception)
return (rc == KeeperException.Code.CONNECTIONLOSS.intValue()) ||
(rc == KeeperException.Code.OPERATIONTIMEOUT.intValue()) ||
(rc == KeeperException.Code.SESSIONMOVED.intValue()) ||
(rc == KeeperException.Code.SESSIONEXPIRED.intValue()) ||
(rc == -13); // KeeperException.Code.NEWCONFIGNOQUORUM.intValue()) - using hard coded value for ZK 3.4.x compatibility
(rc == KeeperException.Code.SESSIONEXPIRED.intValue());
}
return false;
}
@@ -637,8 +637,7 @@ <DATA_TYPE> void processBackgroundOperation(OperationAndData<DATA_TYPE> operatio
boolean doQueueOperation = false;
do
{
final KeeperException ke = KeeperException.create(event.getResultCode());
if ( getZookeeperClient().getRetryPolicy().allowRetry(ke) )
if ( getZookeeperClient().getRetryPolicy().allowRetry(KeeperException.create(event.getResultCode())) )
{
doQueueOperation = checkBackgroundRetry(operationAndData, event);
break;

0 comments on commit c325996

Please sign in to comment.