@Override
  public ICachedMNode getChildNode(ICachedMNode parent, String childName)
      throws MetadataException, IOException {
    SchemaPageContext cxt = new SchemaPageContext();
    threadContexts.put(Thread.currentThread().getId(), cxt);

    if (getNodeAddress(parent) < 0) {
      throw new MetadataException(
          String.format(
              "Node [%s] has no valid segment address in pbtree file.", parent.getFullPath()));
    }

    // a single read lock on initial page is sufficient to mutex write, no need to trace it
    int initIndex = getPageIndex(getNodeAddress(parent));
    ISchemaPage initPage = getPageInstance(initIndex, cxt);
    initPage.getLock().readLock().lock();
    initPage = validatePage(initPage, parent, cxt);
    try {
      long actualSegAddr = getTargetSegmentAddress(getNodeAddress(parent), childName, cxt);
      ICachedMNode child =
          getPageInstance(getPageIndex(actualSegAddr), cxt)
              .getAsSegmentedPage()
              .read(getSegIndex(actualSegAddr), childName);

      if (child == null && parent.isDevice()) {
        // try read alias directly first
        child =
            getPageInstance(getPageIndex(actualSegAddr), cxt)
                .getAsSegmentedPage()
                .readByAlias(getSegIndex(actualSegAddr), childName);
        if (child != null) {
          return child;
        }

        // try read with sub-index
        return getChildWithAlias(parent, childName, cxt);
      }
      return child;
    } finally {
      initPage.getLock().readLock().unlock();
      pagePool.releaseReferent(cxt);
      threadContexts.remove(Thread.currentThread().getId(), cxt);
    }
  }
Since transplant and replacement may invalidate page instance held by a blocked read-thread,
the read-thread need to validate its page object once it obtained the lock.

@param initPage page instance with read lock held
@param parent MTree node to read children, containing latest segment address
@param cxt update context if page/segment modified
@return validated page
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/pagemgr/BTreePageManager.java