Bram Schuur created HBASE-30463:
-----------------------------------

             Summary:  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: 2.5.14, 2.6.5, 3.0.0, 2.7.0
            Reporter: Bram Schuur


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.



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

Reply via email to