@Override
  public ICachedMNode addChild(String name, ICachedMNode child) {
    /* use cpu time to exchange memory
     * measurementNode's children should be null to save memory
     * add child method will only be called when writing MTree, which is not a frequent operation
     */
    if (children == null) {
      // double check, children is volatile
      synchronized (this) {
        if (children == null) {
          children = new CachedMNodeContainer();
        }
      }
    }
    child.setParent(this);
    ICachedMNode existingChild = children.putIfAbsent(name, child);
    return existingChild == null ? child : existingChild;
  }
add a child to current mnode

@param name child's name
@param child child's node
@return the child of this node after addChild
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/mnode/impl/CachedBasicInternalMNode.java