@TableModel
  public long getDatabaseMaxTTL(final String database) {
    databaseReadWriteLock.readLock().lock();
    try {
      return tableModelMTree
          .getAllTablesUnderSpecificDatabase(PartialPath.getQualifiedDatabasePartialPath(database))
          .stream()
          .map(pair -> pair.getLeft().getTableTTL())
          .reduce(Long::max)
          .orElse(Long.MAX_VALUE);
    } catch (final MetadataException e) {
      LOGGER.warn(
          ERROR_NAME + " when trying to get max ttl under one database, use Long.MAX_VALUE.", e);
    } finally {
      databaseReadWriteLock.readLock().unlock();
    }
    return Long.MAX_VALUE;
  }
Only leader use this interface. Get the matched DatabaseSchemas.

@param prefix prefix path such as root.a
@return All DatabaseSchemas that matches to the prefix path such as root.a.db1, root.a.db2
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java