Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-26447

Make enableReplicationPeer/disableReplicationPeer idempotent

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Admin, Replication
    • None

    Description

      When enableReplicationPeer is called and the peer is already enabled, DoNotRetryIOException is being thrown as part of preEnablePeer here, similarly with disableReplicationPeer here.

      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

      Attachments

        Issue Links

          Activity

            vjasani Viraj Jasani added a comment - - edited

            Making enablePeer idempotent is a good idea. zhangduo Thoughts on this? Should this be marked an incompatible change and go through deprecation cycle while new API can be named enableReplicationPeerIdempotent or enableReplicationPeerV2?

            vjasani Viraj Jasani added a comment - - edited Making enablePeer idempotent is a good idea. zhangduo Thoughts on this? Should this be marked an incompatible change and go through deprecation cycle while new API can be named enableReplicationPeerIdempotent or enableReplicationPeerV2?
            zhangduo Duo Zhang added a comment -

            I would expect we do this trick at client side?

            zhangduo Duo Zhang added a comment - I would expect we do this trick at client side?
            zhangduo Duo Zhang added a comment -

            Maybe we could implement special DoNotRetryIOExceptions, which are called PeerNotDisabledException and PeerNotEnabledException, just like TableNotDisabledException and TableNotEnabledException, so at client it is easier for us to ignore these exceptions?

            zhangduo Duo Zhang added a comment - Maybe we could implement special DoNotRetryIOExceptions, which are called PeerNotDisabledException and PeerNotEnabledException, just like TableNotDisabledException and TableNotEnabledException, so at client it is easier for us to ignore these exceptions?

            People

              nishtha11shah Nishtha Shah
              nishtha11shah Nishtha Shah
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: