prestodb/presto · error · PrestoException

MISSING_DATA

MISSING_DATA

Error message

Failed to find table on a worker.

What it means

MemoryPagesStore.add throws MISSING_DATA when the page's tableId is not present in this worker's page store (contains(tableId) is false). The memory connector keeps table data only on the worker that created the table handle; if a page arrives at a worker that never saw the table creation, data routing is broken.

Source

Thrown at presto-memory/src/main/java/com/facebook/presto/plugin/memory/MemoryPagesStore.java:62

    private final Map<Long, TableData> tables = new HashMap<>();

    @Inject
    public MemoryPagesStore(MemoryConfig config)
    {
        this.maxBytes = config.getMaxDataPerNode().toBytes();
    }

    public synchronized void initialize(long tableId)
    {
        if (!tables.containsKey(tableId)) {
            tables.put(tableId, new TableData());
        }
    }

    public synchronized void add(Long tableId, Page page)
    {
        if (!contains(tableId)) {
            throw new PrestoException(MISSING_DATA, "Failed to find table on a worker.");
        }

        page.compact();

        long newSize = currentBytes + page.getRetainedSizeInBytes();
        if (maxBytes < newSize) {
            throw new PrestoException(MEMORY_LIMIT_EXCEEDED, format("Memory limit [%d] for memory connector exceeded", maxBytes));
        }
        currentBytes = newSize;

        TableData tableData = tables.get(tableId);
        tableData.add(page);
    }

    public synchronized List<Page> getPages(
            Long tableId,
            int partNumber,
            int totalParts,

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Run memory-connector workloads single-node, or configure table creation so data is created on the coordinator/creator node (memory connector pins tables to their creating node).
  2. Retry the query — a worker restart mid-query is transient; resubmit the statement.
  3. Check worker logs for restarts/failures around the failing query.
  4. Avoid elastic scaling (node add/remove) while memory-connector inserts are in flight.
Defensive patterns

Strategy: retry

Try / catch

try { insert(...) } catch (PrestoException e) { if (MISSING_DATA.equals(e.getErrorCode()) && e.getMessage().contains("Failed to find table on a worker")) { retryWithBackoffOrResubmit(); } else throw e; }

Prevention

When it happens

Trigger: Writing pages for a table whose TableHandle was created on a different worker; worker restart/loss between table creation and insert; split dispatched to the wrong node in a multi-node memory-connector deployment.

Common situations: Running the memory connector on a multi-node cluster where table data must be pinned to one worker; worker failure mid-insert; cluster resize during a query.

Related errors


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