Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Incompatible change, Reviewed
-
Description
I used to thought the work is only done in the InitMetaProcedure but in fact we have several pieces of code related to this which are placed in different classes.
In HRegionServer.initializeFileSystem, we will test whether we are HMaster. If so, we will call FSTableDescriptors.tryUpdateMetaTableDescriptor. And in MasterFileSystem.checkRootDir, we will check if meta region is available. If not, we will bootstrap it, and it will also call FSTableDescriptors.tryUpdateMetaTableDescriptor.
The problem here is that, HRegionServer.initializeFileSystem is called in the constructor of HRegionServer, which means it will be executed before MasterFileSystem.checkRootDir, as we will only create the MasterFileSystem for active master...
Ideally I prefer we move all the bootstrap code into InitMetaProcedure, which will be much cleaner. If this can not be done, at least we could move the code into MasterFileSystem.
Attachments
Issue Links
- causes
-
HBASE-24833 Bootstrap should not delete the META table directory if it's not partial
- Resolved
- links to