[GitHub] [hbase] bharathv commented on pull request #2274: HBASE-24896 'Stuck' in static initialization creating RegionInfo inst…

2020-08-20 Thread GitBox


bharathv commented on pull request #2274:
URL: https://github.com/apache/hbase/pull/2274#issuecomment-677785949


   > This approach looks sufficient breaking the possible static load tangle. I 
could add this to first patch -- deprecating and nulling UNDEFINED 
   
   Wondering if this is sufficient. Going by the jstacks, FIRST_META_REGIONINFO 
access triggers a MutableRegionInfo load and that triggers the parent interface 
RegionInfo load [1]. And any UNDEFINED access in RegionInfo triggers the exact 
opposite order. I was under the impression that we should break this tie. While 
un-nesting MutableRegionInfo is a welcome change, curious if that solves the 
problem. Thanks.
   
   [1] https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.4.2



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:
us...@infra.apache.org




[GitHub] [hbase] bharathv commented on pull request #2274: HBASE-24896 'Stuck' in static initialization creating RegionInfo inst…

2020-08-19 Thread GitBox


bharathv commented on pull request #2274:
URL: https://github.com/apache/hbase/pull/2274#issuecomment-676516425


   > RegionInfoBuilder and RegionInfo deeply reference each other, even if you 
remove the FIRST_META_REGIONINFO, there are lots of methods which return value 
or parameters are RegionInfo, and the MutableRegionInfo is a sub class of 
RegionInfo, and also a ineer class of RegionInfoBuilder...
   
   Right. This patch just reduces the window and chance of init race. If we see 
the jstacks (and see all the places that got changed in the patch), 
FIRST_META_REGIONINFO is touched in many init code paths and can potentially 
cause these races. The whole dependency system is still fragile and as you 
said, the proper way is to decouple them and I think that would be a much 
bigger refactor given the static fields are sprinkled all over the place and 
some of those places are IA.Public.



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:
us...@infra.apache.org