You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ruanhui (Jira)" <ji...@apache.org> on 2023/07/24 14:56:00 UTC
[jira] [Commented] (HBASE-27988) NPE in AddPeerProcedure recovery
[ https://issues.apache.org/jira/browse/HBASE-27988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17746491#comment-17746491 ]
ruanhui commented on HBASE-27988:
---------------------------------
The PR is ready. PTAL. [~zhangduo]
Thanks.
> NPE in AddPeerProcedure recovery
> --------------------------------
>
> Key: HBASE-27988
> URL: https://issues.apache.org/jira/browse/HBASE-27988
> Project: HBase
> Issue Type: Bug
> Components: Replication
> Affects Versions: 4.0.0-alpha-1
> Reporter: ruanhui
> Assignee: ruanhui
> Priority: Trivial
> Fix For: 3.0.0-alpha-4
>
>
> AddPeerProcedure will restore syncReplicationPeerLock when replayed in master recovery, however the replicationPeerManager has not been initialized when replay procedure, which will cause a nullPointerException and master to abort.
> {code:java}
> @Override
> protected void afterReplay(MasterProcedureEnv env) {
> // ......
> if (peerConfig.isSyncReplication()) {
> if (!env.getReplicationPeerManager().tryAcquireSyncReplicationPeerLock()) {
> throw new IllegalStateException(
> "Can not acquire sync replication peer lock for peer " + peerId);
> }
> }
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)