teamconfx opened a new pull request, #7668: URL: https://github.com/apache/hbase/pull/7668
Fix for [HBASE-29805](https://issues.apache.org/jira/browse/HBASE-29805) ### Issue A NullPointerException occurred in AbstractRpcClient.createAddr() when attempting to split a region after a RegionServer restart. The root cause was that node.getRegionLocation() can return null when a region is OPEN but not yet assigned to a server, and this wasn't being checked in SplitTableRegionProcedure.checkSplittable(). ### The Fix Modified SplitTableRegionProcedure.java at line 208-227 to add an explicit null check for regionLocation before it's used: ```java if (node != null) { // Check if region is assigned to a server before proceeding ServerName regionLocation = node.getRegionLocation(); if (regionLocation == null) { throw new DoNotRetryIOException("Region " + regionToSplit.getShortNameToLog() + " is not assigned to any server. Cannot check splittability."); } // ... rest of the code uses regionLocation variable instead of node.getRegionLocation() } ``` ### Changes Made - Added null check for regionLocation that throws a meaningful DoNotRetryIOException - Stored node.getRegionLocation() in a local variable regionLocation to avoid redundant method calls - Updated subsequent code to use the local regionLocation variable -- 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]
