This is an automated email from the ASF dual-hosted git repository.

shashikant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git


The following commit(s) were added to refs/heads/master by this push:
     new fe2b15d  RATIS-532. UnorderedAsync requests should fail instead of 
retrying the request in case of GroupMismatchException. Contributed by 
Shashikant Banerjee.
fe2b15d is described below

commit fe2b15d2f1eb5dfb6a957414e8dc42e863027266
Author: Shashikant Banerjee <[email protected]>
AuthorDate: Mon Apr 29 19:30:02 2019 +0530

    RATIS-532. UnorderedAsync requests should fail instead of retrying the 
request in case of GroupMismatchException. Contributed by Shashikant Banerjee.
---
 .../src/main/java/org/apache/ratis/client/impl/UnorderedAsync.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/ratis-client/src/main/java/org/apache/ratis/client/impl/UnorderedAsync.java 
b/ratis-client/src/main/java/org/apache/ratis/client/impl/UnorderedAsync.java
index 73e485c..f317682 100644
--- 
a/ratis-client/src/main/java/org/apache/ratis/client/impl/UnorderedAsync.java
+++ 
b/ratis-client/src/main/java/org/apache/ratis/client/impl/UnorderedAsync.java
@@ -95,7 +95,10 @@ public interface UnorderedAsync {
           if (e instanceof IOException) {
             if (e instanceof NotLeaderException) {
               client.handleNotLeaderException(request, (NotLeaderException) e, 
false);
-            } else if (!(e instanceof GroupMismatchException)) {
+            } else if (e instanceof GroupMismatchException) {
+              f.completeExceptionally(e);
+              return;
+            } else {
               client.handleIOException(request, (IOException) e, null, false);
             }
           } else {

Reply via email to