private void popStack() {
    VisitorStackEntry stackEntry = visitorStack.pop();
    stackEntry.iterator.close();
    // The ancestor pop operation with level check supports the children of one node pushed by
    // batch.
    if (!visitorStack.isEmpty() && visitorStack.peek().level < ancestorStack.size()) {
      AncestorStackEntry ancestorStackEntry = ancestorStack.remove(ancestorStack.size() - 1);
      releaseNode(ancestorStackEntry.node);
      if (ancestorStack.size() <= firstAncestorOfTraceback) {
        firstAncestorOfTraceback = -1;
      }
    }
  }
This method must be invoked before iteration
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/tree/AbstractTreeVisitor.java