Apache9 commented on a change in pull request #241: HBASE-22432 HRegionServer
rssStub handling is incorrect and inconsistent
URL: https://github.com/apache/hbase/pull/241#discussion_r285938883
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
##########
@@ -3858,26 +3864,30 @@ void reportProcedureDone(ReportProcedureDoneRequest
request) throws IOException
}
private RegionServerStatusService.BlockingInterface ensureRssStub() {
- return ensureRssStub(false, Integer.MAX_VALUE);
+ return ensureRssStub(0);
}
- private RegionServerStatusService.BlockingInterface ensureRssStub(
- boolean checkClusterConn, int maxRetries) {
+ private RegionServerStatusService.BlockingInterface ensureRssStub(int
maxRetries) {
RegionServerStatusService.BlockingInterface rss = null;
- while (maxRetries-- >= 0 && (!checkClusterConn
- || (checkClusterConn && clusterConnection != null &&
!clusterConnection.isClosed()))) {
- rss = rssStub;
- if (rss != null) {
- break;
+ while (rss == null && maxRetries-- >= 0
+ && (clusterConnection != null && !clusterConnection.isClosed())) {
+ synchronized (rssStubLock) {
+ if (resetRssStub) {
Review comment:
I do not fully understand what's the usage of this `resetRssStub` flag... We
do not test it in the condition of the while loop?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services