@Override
  public void deactivateTemplateInBlackList(final IDeactivateTemplatePlan plan)
      throws MetadataException {
    // TODO: We can consider implement this as a consumer passed to MTree which takes responsibility
    // of operating tree structure and concurrency control in future work.
    final Map<PartialPath, List<Integer>> resultTemplateSetInfo =
        mTree.deactivateTemplateInBlackList(plan.getTemplateSetInfo());
    writeToMLog(SchemaRegionWritePlanFactory.getDeactivateTemplatePlan(resultTemplateSetInfo));
  }
remove the node from the tag inverted index
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/impl/SchemaRegionMemoryImpl.java