apache/cassandra · error · RuntimeException

Error while refreshing system.size_estimates

Error message

Error while refreshing system.size_estimates

What it means

NodeProbe.refreshSizeEstimates() calls StorageServiceMBean.refreshSizeEstimates(), which recomputes system.size_estimates rows for all tables. The underlying task runs through a future; an ExecutionException means the refresh computation itself failed on the server side. The RuntimeException carries the server-side cause.

Source

Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:1489

    public void truncateHints()
    {
        hsProxy.deleteAllHints();
    }

    public List<Map<String, String>> listPendingHints()
    {
        return hsProxy.getPendingHints();
    }

    public void refreshSizeEstimates()
    {
        try
        {
            ssProxy.refreshSizeEstimates();
        }
        catch (ExecutionException e)
        {
            throw new RuntimeException("Error while refreshing system.size_estimates", e);
        }
    }

    public void stopNativeTransport(boolean force)
    {
        ssProxy.stopNativeTransport(force);
    }

    public void startNativeTransport()
    {
        ssProxy.startNativeTransport();
    }

    public boolean isNativeTransportRunning()
    {
        return ssProxy.isNativeTransportRunning();
    }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Unwrap e.getCause() to find the server-side failure
  2. Run `nodetool describecluster` to check for schema disagreement and repair it
  3. Retry after the schema/cluster stabilizes
  4. Alternatively drop and let Cassandra repopulate size_estimates rows

Example fix

// before
probe.refreshSizeEstimates();
// after
try {
    probe.refreshSizeEstimates();
} catch (RuntimeException e) {
    throw new RuntimeException("refresh failed: " + e.getCause(), e);
}
Defensive patterns

Strategy: retry

Validate before calling

if (schemaDisagreementDetected()) throw new IllegalStateException("resolve schema disagreement before refreshsizeestimates");

Try / catch

try { probe.refreshSizeEstimates(); } catch (RuntimeException e) { logger.error("refresh failed: {}", e.getCause(), e); /* retry after cluster stabilizes */ }

Prevention

When it happens

Trigger: Calling `nodetool refreshsizeestimates` when the internal computation (reading schema/table metadata or scanning ranges) throws, e.g. schema disagreement or missing tables.

Common situations: Clusters mid-rolling-upgrade with schema disagreement; dropped/altered tables while estimates refresh; corrupted or partially migrated system.size_estimates data.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/e572dd45ca4f25f5. Report an issue: GitHub.