public Map<String, TDatabaseSchema> getMatchedDatabaseSchemasByPrefix(final PartialPath prefix) {
    final Map<String, TDatabaseSchema> schemaMap = new HashMap<>();
    databaseReadWriteLock.readLock().lock();
    try {
      final List<PartialPath> matchedPaths =
          treeModelMTree.getMatchedDatabases(prefix, ALL_MATCH_SCOPE, true);
      for (final PartialPath path : matchedPaths) {
        schemaMap.put(
            path.getFullPath(),
            treeModelMTree.getDatabaseNodeByPath(path).getAsMNode().getDatabaseSchema());
      }
    } catch (final MetadataException e) {
      LOGGER.warn(ERROR_NAME, e);
    } finally {
      databaseReadWriteLock.readLock().unlock();
    }
    return schemaMap;
  }
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