You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Nishtha Shah (Jira)" <ji...@apache.org> on 2021/11/11 03:57:00 UTC

[jira] [Updated] (HBASE-26447) Make enableReplicationPeer/disableReplicationPeer idempotent

     [ https://issues.apache.org/jira/browse/HBASE-26447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nishtha Shah updated HBASE-26447:
---------------------------------
    Priority: Minor  (was: Trivial)

> 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
>            Priority: Minor
>
> 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)