[
https://issues.apache.org/jira/browse/HBASE-30463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Somogyi resolved HBASE-30463.
-----------------------------------
Fix Version/s: 4.0.0-alpha-1
2.7.0
3.1.0
3.0.1
2.6.8
2.5.17
Resolution: Fixed
Thanks [~bramschuur] for the bugfix! I merged the PR to all active branches.
> HMaster fails to initialize when the procedure store contains more than one
> ServerCrashProcedure for the same server
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-30463
> URL: https://issues.apache.org/jira/browse/HBASE-30463
> Project: HBase
> Issue Type: Bug
> Components: master
> Affects Versions: 3.0.0, 2.7.0, 2.6.5, 2.5.14
> Reporter: Bram Schuur
> Assignee: Bram Schuur
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0-alpha-1, 2.7.0, 3.1.0, 3.0.1, 2.6.8, 2.5.17
>
>
> Since HBASE-28158, HMaster.finishActiveMasterInitialization collects
> unfinished SCPs with Collectors.toMap(ServerCrashProcedure::getServerName,
> Procedure::getSubmittedTime) with no merge function. If the procedure store
> holds two unfinished SCPs for the same ServerName, the collector throws
> IllegalStateException: Duplicate key. The master aborts on every restart and
> can't recover without manual store surgery. The previous code collected into
> a Set and tolerated this. Duplicate SCPs are possible because the in-memory
> guards depend on DeadServer, which cleanPreviousInstance clears when a server
> restarts on the same host and port while its SCP is still running. Fix: merge
> duplicates with Long::min, matching DeadServer.putIfAbsent's keep-first
> behaviour. Both procedures can then run; they serialize on the server's
> exclusive lock.
> Co-Authored by Claude Code
--
This message was sent by Atlassian Jira
(v8.20.10#820010)