Apache9 commented on code in PR #8339:
URL: https://github.com/apache/hbase/pull/8339#discussion_r3499853704
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java:
##########
@@ -375,7 +375,15 @@ private boolean include(final RegionStateNode node, final
boolean offline) {
//
============================================================================================
private void setServerState(ServerName serverName, ServerState state) {
- ServerStateNode serverNode = getServerNode(serverName);
+ // The ServerStateNode is only kept in memory and is rebuilt on Master
startup for the 'live'
+ // servers (RegionServerTracker#upgrade) and for servers still referenced
as a region location
+ // in hbase:meta (AssignmentManager#loadMeta). A ServerCrashProcedure
persisted before a Master
+ // restart can resume for a server that is no longer 'live' and is not
referenced by any region
+ // in meta, so no node was recreated for it. See HBASE-28659. These split
helpers only ever run
+ // for a crashed server inside an SCP, so recreate the node rather than
NPE; the SCP will remove
+ // it again via removeServer at SERVER_CRASH_FINISH.
+ ServerStateNode serverNode =
Review Comment:
What I mean is that, we should change the code in SCP? If there is no server
state node, we should create it before calling setServerState, but we'd better
not creating server state node automatically inside setServerState.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]