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

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

    [ https://issues.apache.org/jira/browse/HBASE-26447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17449898#comment-17449898 ] 

Viraj Jasani commented on HBASE-26447:
--------------------------------------

Making enablePeer idempotent is a good idea. [~zhangduo] Thoughts on this? Should this be marked an incompatible change and only be restricted to master branch?

> 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)