private void addNonVolatileAncestorToBuffer(ICachedMNode node) {
    ICachedMNode parent = node.getParent();
    CacheEntry cacheEntry = parent.getCacheEntry();

    // make sure that the nodeBuffer contains all the root node of volatile subTree
    // give that root.sg.d.s, if sg and d have been persisted and s are volatile, then d
    // will be added to nodeBuffer
    synchronized (cacheEntry) {
      // the cacheEntry may be set to volatile concurrently, the unVolatile node should not be
      // added
      // to nodeBuffer, which prevent the duplicated collecting on subTree
      if (!cacheEntry.isVolatile()) {
        put(cacheEntry, parent);
      }
    }
  }
look for the first none volatile ancestor of this node and add it to nodeBuffer. Through this
the volatile subtree the given node belong to will be record in nodeBuffer.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/memory/buffer/NodeBuffer.java