{"record":{"id":"e572dd45ca4f25f5","repo":"apache/cassandra","slug":"error-while-refreshing-system-size-estimates","errorCode":null,"errorMessage":"Error while refreshing system.size_estimates","messagePattern":"Error while refreshing system\\.size_estimates","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/NodeProbe.java","lineNumber":1489,"sourceCode":"    public void truncateHints()\n    {\n        hsProxy.deleteAllHints();\n    }\n\n    public List<Map<String, String>> listPendingHints()\n    {\n        return hsProxy.getPendingHints();\n    }\n\n    public void refreshSizeEstimates()\n    {\n        try\n        {\n            ssProxy.refreshSizeEstimates();\n        }\n        catch (ExecutionException e)\n        {\n            throw new RuntimeException(\"Error while refreshing system.size_estimates\", e);\n        }\n    }\n\n    public void stopNativeTransport(boolean force)\n    {\n        ssProxy.stopNativeTransport(force);\n    }\n\n    public void startNativeTransport()\n    {\n        ssProxy.startNativeTransport();\n    }\n\n    public boolean isNativeTransportRunning()\n    {\n        return ssProxy.isNativeTransportRunning();\n    }\n","sourceCodeStart":1471,"sourceCodeEnd":1507,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/NodeProbe.java#L1471-L1507","documentation":"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.","triggerScenarios":"Calling `nodetool refreshsizeestimates` when the internal computation (reading schema/table metadata or scanning ranges) throws, e.g. schema disagreement or missing tables.","commonSituations":"Clusters mid-rolling-upgrade with schema disagreement; dropped/altered tables while estimates refresh; corrupted or partially migrated system.size_estimates data.","solutions":["Unwrap e.getCause() to find the server-side failure","Run `nodetool describecluster` to check for schema disagreement and repair it","Retry after the schema/cluster stabilizes","Alternatively drop and let Cassandra repopulate size_estimates rows"],"exampleFix":"// before\nprobe.refreshSizeEstimates();\n// after\ntry {\n    probe.refreshSizeEstimates();\n} catch (RuntimeException e) {\n    throw new RuntimeException(\"refresh failed: \" + e.getCause(), e);\n}","handlingStrategy":"retry","validationCode":"if (schemaDisagreementDetected()) throw new IllegalStateException(\"resolve schema disagreement before refreshsizeestimates\");","typeGuard":null,"tryCatchPattern":"try { probe.refreshSizeEstimates(); } catch (RuntimeException e) { logger.error(\"refresh failed: {}\", e.getCause(), e); /* retry after cluster stabilizes */ }","preventionTips":["Ensure schema agreement across the cluster before refreshing","Avoid refreshing while schema changes are in flight","Always inspect e.getCause() for the server-side error"],"tags":["jmx","nodetool","size-estimates","execution"],"backgroundTag":"database-query-failed","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}