You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2020/05/07 22:40:00 UTC
[curator] 02/03: Address comments
This is an automated email from the ASF dual-hosted git repository.
randgalt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/curator.git
commit c32599670667e6c3f9b9773d3415e3b57b551fd0
Author: tison <wa...@gmail.com>
AuthorDate: Thu May 7 23:54:59 2020 +0800
Address comments
---
curator-client/src/main/java/org/apache/curator/RetryPolicy.java | 3 +--
.../java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/curator-client/src/main/java/org/apache/curator/RetryPolicy.java b/curator-client/src/main/java/org/apache/curator/RetryPolicy.java
index 49f2e88..6d5d4d1 100644
--- a/curator-client/src/main/java/org/apache/curator/RetryPolicy.java
+++ b/curator-client/src/main/java/org/apache/curator/RetryPolicy.java
@@ -52,8 +52,7 @@ public interface RetryPolicy
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;
}
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
index e704f02..d4d8241 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
@@ -637,8 +637,7 @@ public class CuratorFrameworkImpl implements CuratorFramework
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;