@Override
  public void createOrUpdateTableDevice(final CreateOrUpdateTableDeviceNode node)
      throws MetadataException {
    for (int i = 0; i < node.getDeviceIdList().size(); i++) {
      final String databaseName = databaseFullPath;
      final String tableName = node.getTableName();
      final String[] deviceId =
          Arrays.stream(node.getDeviceIdList().get(i))
              .map(o -> Objects.nonNull(o) ? o.toString() : null)
              .toArray(String[]::new);
      final List<String> attributeNameList = node.getAttributeNameList();
      final Object[] attributeValueList = node.getAttributeValueList().get(i);

      mTree.createOrUpdateTableDevice(
          tableName,
          deviceId,
          () ->
              deviceAttributeStore.createAttribute(
                  attributeNameList, attributeValueList, node.getTableName()),
          pointer -> {
            updateAttribute(
                databaseName, tableName, deviceId, pointer, attributeNameList, attributeValueList);
            deviceAttributeCacheUpdater.afterUpdate();
          });
    }
    writeToMLog(node);
  }
remove the node from the tag inverted index
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/impl/SchemaRegionMemoryImpl.java