public boolean deleteTableDevice(final String tableName, final IntConsumer attributeDeleter)
      throws MetadataException {
    if (!store.hasChild(storageGroupMNode, tableName)) {
      return false;
    }
    final AtomicInteger memoryReleased = new AtomicInteger(0);
    try (final MNodeCollector<Void, IMemMNode> collector =
        new MNodeCollector<Void, IMemMNode>(
            storageGroupMNode,
            new PartialPath(new String[] {storageGroupMNode.getName(), tableName}),
            this.store,
            true,
            SchemaConstant.ALL_MATCH_SCOPE) {
          @Override
          protected boolean acceptInternalMatchedNode(final IMemMNode node) {
            return true;
          }

          @Override
          protected Void collectMNode(final IMemMNode node) {
            if (node.isDevice()) {
              attributeDeleter.accept(
                  ((TableDeviceInfo<IMemMNode>) node.getAsDeviceMNode().getDeviceInfo())
                      .getAttributePointer());
            }
            memoryReleased.addAndGet(node.estimateSize());
            return null;
          }
        }) {
      collector.traverse();
    }
    storageGroupMNode.deleteChild(tableName);
    regionStatistics.resetTableDevice(tableName);
    store.releaseMemory(memoryReleased.get());
    return true;
  }
Get node by the path

@return last node in given seriesPath
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java