You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Duo Zhang (Jira)" <ji...@apache.org> on 2022/09/13 14:52:00 UTC

[jira] [Created] (HBASE-27368) Do not need to throw IllegalStateException when peer is not active in ReplicationSource.initialize

Duo Zhang created HBASE-27368:
---------------------------------

             Summary: Do not need to throw IllegalStateException when peer is not active in ReplicationSource.initialize
                 Key: HBASE-27368
                 URL: https://issues.apache.org/jira/browse/HBASE-27368
             Project: HBase
          Issue Type: Bug
          Components: regionserver, Replication
            Reporter: Duo Zhang
            Assignee: Duo Zhang


The only place where we can reset the sourceRunning flag to false is in terminate method, where we want to stop the replication source. And we already have a interrupted state check in the initialize method to not throw IllegalStateException when peer is terminating, so I think here we could just do not throw IllegalStateExeption at all.

The reason why the interrupted state check does not work is that, in FutureUtils.get, we will wrap InterruptedException with InterruptedIOException, without restoring the interrupted state, but the upper layer does not treat InterruptedIOException specially so the interrupted state is lost. But anway, I do not think we should rely on the interrupted state to determine whether we should abort the region server...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)