public void isDatabaseNameValid(final String databaseName, final boolean isTableModel)
      throws MetadataException {
    databaseReadWriteLock.readLock().lock();
    try {
      (isTableModel ? tableModelMTree : treeModelMTree)
          .checkDatabaseAlreadySet(getQualifiedDatabasePartialPath(databaseName));
    } finally {
      databaseReadWriteLock.readLock().unlock();
    }
  }
Check if the specified DatabaseName is valid.

@param databaseName The specified DatabaseName
@throws MetadataException If the DatabaseName invalid i.e. the specified DatabaseName is
    already exist, or it's a prefix of another DatabaseName
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java