prestodb/presto · critical · PrestoException
GENERIC_INTERNAL_ERROR
GENERIC_INTERNAL_ERROR
Error message
Distribution for dynamic system table must be ${SINGLE_COORDINATOR} What it means
MetadataBasedSystemTablesProvider.getSystemTable enforces that any dynamic system table it returns uses SINGLE_COORDINATOR distribution, because dynamic tables need access to the coordinator's transaction context and can therefore only execute on the current coordinator. A table whose distribution differs indicates an internal/connector bug, so GENERIC_INTERNAL_ERROR (not a user error) is thrown.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/connector/system/MetadataBasedSystemTablesProvider.java:60
this.catalogName = requireNonNull(catalogName, "catalogName is null");
}
@Override
public Set<SystemTable> listSystemTables(ConnectorSession session)
{
return ImmutableSet.of();
}
@Override
public Optional<SystemTable> getSystemTable(ConnectorSession session, SchemaTableName tableName)
{
Optional<SystemTable> systemTable = metadata.getSystemTable(
((FullConnectorSession) session).getSession(),
new QualifiedObjectName(catalogName, tableName.getSchemaName(), tableName.getTableName()));
// dynamic system tables require access to the transaction and thus can only run on the current coordinator
if (systemTable.isPresent() && systemTable.get().getDistribution() != SINGLE_COORDINATOR) {
throw new PrestoException(GENERIC_INTERNAL_ERROR, "Distribution for dynamic system table must be " + SINGLE_COORDINATOR);
}
return systemTable;
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Fix the connector: return SystemTable.Distribution.SINGLE_COORDINATOR from the dynamic system table's getDistribution().
- Update the connector plugin to a version compatible with the running Presto server.
- If you own neither, report the bug to the connector maintainer with the table name; this is not fixable from the query side.
Example fix
// before
@Override
public Distribution getDistribution() {
return Distribution.CONNECTOR_TO_DISTRIBUTED_NODES;
}
// after
@Override
public Distribution getDistribution() {
return Distribution.SINGLE_COORDINATOR;
} Defensive patterns
Strategy: validation
Validate before calling
if (systemTable.getDistribution() != SystemTable.Distribution.SINGLE_COORDINATOR) {
throw new IllegalStateException("Dynamic system table must use SINGLE_COORDINATOR distribution");
} Try / catch
try { tables = readSystemTable(...); }
catch (PrestoException e) { if (e.getErrorCode() == StandardErrorCode.GENERIC_INTERNAL_ERROR.toErrorCode()) { reportConnectorBug(tableName); } throw e; } Prevention
- Always return SINGLE_COORDINATOR from dynamic system tables in custom connectors
- Pin connector plugin versions to the server version during upgrades
- Add a connector test asserting every dynamic SystemTable's distribution
When it happens
Trigger: A connector registers a dynamic SystemTable whose getDistribution() returns something other than SystemTable.Distribution.SINGLE_COORDINATOR, and a query or procedure reads that system table via the metadata-based provider.
Common situations: Third-party or custom connectors implementing a dynamic system table with CONNECTOR_TO_DISTRIBUTED_NODES distribution; connector version mismatches where a table was updated without updating distribution; Presto engine changes tightening the invariant while a connector lags.
Related errors
- GENERIC_INTERNAL_ERROR
- FUNCTION_IMPLEMENTATION_ERROR
- Unsupported java type %s
- CLICKHOUSE_QUERY_GENERATOR_FAILURE
- KdbTree type cannot be serialized
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/6ae41246d7e76b6a.
Report an issue: GitHub.