public TSStatus deleteDatabase(final DeleteDatabasePlan plan) {
    final TSStatus result = new TSStatus();
    databaseReadWriteLock.writeLock().lock();
    try {
      final boolean isTableModel = PathUtils.isTableModelDatabase(plan.getName());
      // Delete Database
      (isTableModel ? tableModelMTree : treeModelMTree)
          .deleteDatabase(getQualifiedDatabasePartialPath(plan.getName()));

      result.setCode(TSStatusCode.SUCCESS_STATUS.getStatusCode());
    } catch (final MetadataException e) {
      LOGGER.warn("Database not exist", e);
      result
          .setCode(TSStatusCode.SUCCESS_STATUS.getStatusCode())
          .setMessage("Database not exist: " + e.getMessage());
    } finally {
      databaseReadWriteLock.writeLock().unlock();
    }
    return result;
  }
Delete Database.

@param plan DeleteDatabasePlan
@return {@link TSStatusCode#SUCCESS_STATUS}
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java