You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ha...@apache.org on 2020/04/02 23:20:57 UTC

[hadoop-ozone] branch master updated: HDDS-3334. OM Client failover to next OM on NotLeaderException (#760)

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

hanishakoneru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 0189f8d  HDDS-3334. OM Client failover to next OM on NotLeaderException (#760)
0189f8d is described below

commit 0189f8dfd61781d8727a42feed6c8c0936953d9f
Author: Hanisha Koneru <ha...@apache.org>
AuthorDate: Thu Apr 2 16:20:49 2020 -0700

    HDDS-3334. OM Client failover to next OM on NotLeaderException (#760)
---
 .../OzoneManagerProtocolClientSideTranslatorPB.java          | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
index 2e9dac3..128aa3b 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
@@ -250,11 +250,13 @@ public final class OzoneManagerProtocolClientSideTranslatorPB
               getNotLeaderException(exception);
           if (notLeaderException != null &&
               notLeaderException.getSuggestedLeaderNodeId() != null) {
-            // We need to failover manually to the suggested Leader OM Node.
+            // TODO: NotLeaderException should include the host
+            //  address of the suggested leader along with the nodeID.
+            //  Failing over just based on nodeID is not very robust.
+
             // OMFailoverProxyProvider#performFailover() is a dummy call and
-            // does not perform any failover.
-            omFailoverProxyProvider.performFailoverIfRequired(
-                notLeaderException.getSuggestedLeaderNodeId());
+            // does not perform any failover. Failover manually to the next OM.
+            omFailoverProxyProvider.performFailoverToNextProxy();
             return getRetryAction(FAILOVER_AND_RETRY, failovers);
           }
 
@@ -263,7 +265,7 @@ public final class OzoneManagerProtocolClientSideTranslatorPB
           // As in this case, current OM node is leader, but it is not ready.
           // OMFailoverProxyProvider#performFailover() is a dummy call and
           // does not perform any failover.
-          // So Just retry with same ON node.
+          // So Just retry with same OM node.
           if (leaderNotReadyException != null) {
             return getRetryAction(FAILOVER_AND_RETRY, failovers);
           }


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