You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/01/21 14:24:45 UTC

[GitHub] [hadoop-ozone] lokeshj1703 commented on a change in pull request #467: HDDS-2917. Add a different retry policy for watch requests.

lokeshj1703 commented on a change in pull request #467: HDDS-2917. Add a different retry policy for watch requests.
URL: https://github.com/apache/hadoop-ozone/pull/467#discussion_r369028336
 
 

 ##########
 File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java
 ##########
 @@ -277,9 +278,15 @@ static RetryPolicy createRetryPolicy(Configuration conf) {
         .toIntExact(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS);
     TimeDuration sleepDuration =
         TimeDuration.valueOf(retryInterval, TimeUnit.MILLISECONDS);
-    RetryPolicy retryPolicy = RetryPolicies
+    RetryPolicy writeRetryPolicy = RetryPolicies
         .retryUpToMaximumCountWithFixedSleep(maxRetryCount, sleepDuration);
-    return retryPolicy;
+    final RequestTypeDependentRetryPolicy.Builder builder =
+            RequestTypeDependentRetryPolicy.newBuilder();
+    builder.set(RaftProtos.
+            RaftClientRequestProto.TypeCase.WRITE, writeRetryPolicy);
+    builder.set(RaftProtos.
+            RaftClientRequestProto.TypeCase.WATCH, RetryPolicies.noRetry());
 
 Review comment:
   I think we will need to change the watch timeout as well in the leader(default is 10sec, we dont have a config for it in ozone). Maybe we should keep 2-3 retries to include the case of leader changes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org