public List<PartialPath> constructSchemaBlackList(
      final PartialPath pathPattern, final AtomicBoolean isAllLogicalView)
      throws MetadataException {
    final List<PartialPath> result = new ArrayList<>();
    try (final MeasurementUpdater<ICachedMNode> updater =
        new MeasurementUpdater<ICachedMNode>(
            rootNode, pathPattern, store, false, SchemaConstant.ALL_MATCH_SCOPE) {

          protected void updateMeasurement(final IMeasurementMNode<ICachedMNode> node)
              throws MetadataException {
            if (!node.isLogicalView()) {
              isAllLogicalView.set(false);
            }
            store.updateMNode(
                node.getAsMNode(), o -> o.getAsMeasurementMNode().setPreDeleted(true));
            result.add(getPartialPathFromRootToNode(node.getAsMNode()));
          }
        }) {
      updater.update();
    }
    return result;
  }
Used when delete timeseries or deactivate template. The last survived ancestor will be
unpinned.

@param entityMNode delete empty InternalMNode from entityMNode to storageGroupMNode
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/MTreeBelowSGCachedImpl.java