prestodb/presto · error · PinotException

PINOT_UNCLASSIFIED_ERROR

PINOT_UNCLASSIFIED_ERROR

Error message

Cannot fetch from cache %s

What it means

PinotConnection.getFromCache wraps any ExecutionException from a Guava loading cache (all-tables or per-table columns) into PINOT_UNCLASSIFIED_ERROR. The real failure is whatever caused the underlying cache load to fail, attached as the cause.

Source

Thrown at presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotConnection.java:87

                                        nullHandlingEnabled,
                                        pinotConfig.isCaseSensitiveNameMatchingEnabled());
                            }
                        }, executor));

        executor.execute(() -> this.allTablesCache.refresh(ALL_TABLES_CACHE_KEY));
    }

    private static <K, V> V getFromCache(LoadingCache<K, V> cache, K key)
    {
        V value = cache.getIfPresent(key);
        if (value != null) {
            return value;
        }
        try {
            return cache.get(key);
        }
        catch (ExecutionException e) {
            throw new PinotException(PINOT_UNCLASSIFIED_ERROR, Optional.empty(), "Cannot fetch from cache " + key, e.getCause());
        }
    }

    public List<String> getTableNames()
    {
        return getFromCache(allTablesCache, ALL_TABLES_CACHE_KEY);
    }

    public PinotTable getTable(String tableName)
    {
        List<PinotColumn> columns = getPinotColumnsForTable(tableName);
        return new PinotTable(tableName, columns);
    }

    private List<PinotColumn> getPinotColumnsForTable(String tableName)
    {
        return getFromCache(pinotTableColumnCache, tableName);
    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Look at the cause (e.getCause()) logged with this exception to find the real failure
  2. Verify Pinot controller connectivity with curl and restore connectivity if down
  3. Retry after the controller recovers; the cache load is not permanently poisoned
  4. Pin/validate controller and connector versions if the cause is a JSON parse error
Defensive patterns

Strategy: retry

Validate before calling

// Preflight controller check before metadata reads
curl -sf http://<controller>:9000/tables || echo 'controller failing'

Try / catch

try {
    List<String> tables = connection.getTableNames();
} catch (PinotException e) {
    if (e.getMessage().startsWith("Cannot fetch from cache")) {
        // inspect e.getCause(); usually controller/network - retry after recovery
    }
    throw e;
}

Prevention

When it happens

Trigger: getTableNames() or getPinotColumnsForTable() triggers a cache load that throws a non-PinotException — usually a controller HTTP error or JSON parse failure while listing tables or fetching schema.

Common situations: Controller temporarily unreachable while metadata is being read; controller returns malformed schema JSON after an upgrade; concurrent cache loads hitting controller rate limits.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/8951870583d9ffbd. Report an issue: GitHub.