[
https://issues.apache.org/jira/browse/HBASE-27988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Duo Zhang resolved HBASE-27988.
-------------------------------
Fix Version/s: 3.0.0-beta-1
(was: 3.0.0-alpha-4)
Hadoop Flags: Reviewed
Resolution: Fixed
Pushed to master and branch-2.
Thanks [~frostruan] for contributing!
> 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-beta-1
>
>
> 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)