{"record":{"id":"cb75c0feb3f8b890","repo":"apache/cassandra","slug":"failed-to-update-speculative-retry-thresholds","errorCode":null,"errorMessage":"Failed to update speculative retry thresholds.","messagePattern":"Failed to update speculative retry thresholds\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/CassandraDaemon.java","lineNumber":215,"sourceCode":"            jmxServer = JMXServerUtils.createJMXServer(jmxServerOptions);\n        }\n        catch (IOException e)\n        {\n            exitOrFail(1, e.getMessage(), e.getCause());\n        }\n    }\n\n    @VisibleForTesting\n    public static Runnable SPECULATION_THRESHOLD_UPDATER =\n        () ->\n        {\n            try\n            {\n                Keyspace.allExisting().forEach(k -> k.getColumnFamilyStores().forEach(ColumnFamilyStore::updateSpeculationThreshold));\n            }\n            catch (Throwable t)\n            {\n                logger.warn(\"Failed to update speculative retry thresholds.\", t);\n                JVMStabilityInspector.inspectThrowable(t);\n            }\n        };\n\n    static final CassandraDaemon instance = new CassandraDaemon();\n\n    private volatile NativeTransportService nativeTransportService;\n    private JMXConnectorServer jmxServer;\n\n    private final boolean runManaged;\n    private boolean setupCompleted;\n\n    public CassandraDaemon()\n    {\n        this(false);\n    }\n\n    public CassandraDaemon(boolean runManaged)","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/CassandraDaemon.java#L197-L233","documentation":"A warning logged in the CassandraDaemon static initializer when refreshing speculative-retry thresholds for all existing column families throws. The table properties that drive speculative retry could not be re-applied (typically during dynamic schema/property updates), and JVMStabilityInspector decides whether it is fatal.","triggerScenarios":"The runnable wrapping Keyspace.allExisting() -> ColumnFamilyStore.updateSpeculationThreshold throws (e.g. schema disagreement, a table being dropped concurrently, or an invalid speculative_retry value being parsed) while the daemon class initializes or thresholds are updated.","commonSituations":"Concurrent DDL (ALTER/DROP TABLE) racing with daemon startup or threshold refresh; a table schema with an unparseable speculative_retry value from an older version; schema version mismatch across the ring.","solutions":["Run nodetool describecluster / check schema agreement to resolve any schema disagreement before restarting","Validate every table's speculative_retry value (ALTER TABLE ... WITH speculative_retry = '99PERCENTILE' or 'NONE') and fix invalid values","Inspect the chained Throwable in the log for the root cause; if JVMStabilityInspector marked it fatal, fix that root cause and restart"],"exampleFix":"// before\nALTER TABLE ks.tbl WITH speculative_retry = '95percentile';\n// after\nALTER TABLE ks.tbl WITH speculative_retry = '95PERCENTILE';","handlingStrategy":"try-catch","validationCode":"// verify schema agreement before restart\nnodetool describecluster | grep -i 'schema versions'\n// one version = safe; multiple = resolve disagreement first","typeGuard":null,"tryCatchPattern":"try {\n    Keyspace.allExisting().forEach(k -> k.getColumnFamilyStores().forEach(ColumnFamilyStore::updateSpeculationThreshold));\n} catch (Throwable t) {\n    logger.warn(\"Failed to update speculative retry thresholds.\", t);\n    JVMStabilityInspector.inspectThrowable(t);\n}","preventionTips":["Keep speculative_retry values to documented forms (NONE, Xms, XPERCENTILE)","Resolve schema disagreement before rolling restarts","Avoid DROP/ALTER on tables during node startup"],"tags":["schema","speculative-retry","startup"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}