Nishtha Shah created HBASE-26447:
------------------------------------

             Summary: Make enableReplicationPeer/disableReplicationPeer 
idempotent
                 Key: HBASE-26447
                 URL: https://issues.apache.org/jira/browse/HBASE-26447
             Project: HBase
          Issue Type: Improvement
          Components: Admin
            Reporter: Nishtha Shah
            Assignee: Nishtha Shah


When enableReplicationPeer is called and the peer is already enabled, 
DoNotRetryIOException is being thrown as part of preEnablePeer 
[here|https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java#L164],
 similarly with disableReplicationPeer 
[here|https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java#L171].

java.lang.RuntimeException: org.apache.hadoop.hbase.DoNotRetryIOException: 
Replication peer 1 has already been enabled

Ideally, it should not throw a runtimeException, if the peer is already in 
desired state


Either 1. we should add a check before trying to enable/disable peer, and if it 
is already enabled return, else enable the peer or
2. Log the message instead of throwing exception in preEnablePeer/preDisablePeer



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to