if (key != lockKey) {
acquireLock(region, key, lids);
}
// Load parent table first
PTable parentTable = null;
ImmutableBytesPtr parentCacheKey = null;
if (parentKey != null) {
parentCacheKey = new ImmutableBytesPtr(parentKey);
parentTable = loadTable(env, parentKey, parentCacheKey, clientTimeStamp, clientTimeStamp);
if (parentTable == null || isTableDeleted(parentTable)) {
return new MetaDataMutationResult(MutationCode.PARENT_TABLE_NOT_FOUND, EnvironmentEdgeManager.currentTimeMillis(), parentTable);
}
// If parent table isn't at the expected sequence number, then return
if (parentTable.getSequenceNumber() != MetaDataUtil.getParentSequenceNumber(tableMetadata)) {
return new MetaDataMutationResult(MutationCode.CONCURRENT_TABLE_MUTATION, EnvironmentEdgeManager.currentTimeMillis(), parentTable);
}
}
// Load child table next
ImmutableBytesPtr cacheKey = new ImmutableBytesPtr(key);
// Get as of latest timestamp so we can detect if we have a newer table that already exists
// without making an additional query
PTable table = loadTable(env, key, cacheKey, clientTimeStamp, HConstants.LATEST_TIMESTAMP);
if (table != null) {
if (table.getTimeStamp() < clientTimeStamp) {