Apache9 commented on PR #5167:
URL: https://github.com/apache/hbase/pull/5167#issuecomment-1540357533
> @Apache9 I have tried your suggestion of creating put entry of meta table
in master region which gets filled in regionstates and helps to avoid calling
init meta procedure there is problem with this approach. Actually meta
assignment called only two places 1) during server crash procedure when the
region server went down is carrying meta this is not the case during the
express upgrade cases 2) during meta initialisation once after the fs layout
creation step is done. By adding the just meta entry in the master region
without knowing the location, won't reach any of the above flows and leading to
meta region hanging in transition forever.
>
> Here is the code I have tried.
>
> ` } else { TableDescriptor metaTableDescriptor =
tableDescriptors.get(TableName.META_TABLE_NAME); if(metaTableDescriptor != null
&& metaTableDescriptor.getColumnFamily(TABLE_FAMILY) == null) {
MetaTableAccessor.addRegionInfo(put, RegionInfoBuilder.FIRST_META_REGIONINFO);
put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY).setRow(put.getRow())
.setFamily(HConstants.CATALOG_FAMILY)
.setQualifier(RegionStateStore.getStateColumn(RegionInfoBuilder.FIRST_META_REGIONINFO.getReplicaId())).setTimestamp(put.getTimestamp())
.setType(Cell.Type.Put).setValue(Bytes.toBytes(RegionState.State.CLOSED.name())).build());
LOG.info(info.toString()); masterRegion.update(r -> r.put(put)); }`
Better post the full patch somewhere so I can check it? And maybe we need to
manually schedule a TRSP to bring meta region online in this case...
--
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]