{"record":{"id":"5f10fc9fbe0a0329","repo":"apache/cassandra","slug":"failed-to-flush-for-a-waiting-durability-rep","errorCode":null,"errorMessage":"Failed to flush {}.{} for a waiting durability report","messagePattern":"Failed to flush (.+?)\\.(.+?) for a waiting durability report","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/accord/AccordDurableOnFlush.java","lineNumber":202,"sourceCode":"    {\n        long flushIfCreatedBeforeNanos = nanoTime() - flushIfOlderThanNanos;\n        for (ColumnFamilyStore cfs : awaitingFlush)\n        {\n            Memtable memtable = cfs.getTracker().getView().getCurrentMemtable();\n            if (memtable.createdAtNanos() >= flushIfCreatedBeforeNanos)\n                continue;\n\n            try\n            {\n                if (!memtable.hasFlushListener())\n                    continue;\n\n                logger.debug(\"Flushing {}.{} as a durability report is waiting on it\", cfs.getKeyspaceName(), cfs.name);\n                cfs.switchMemtableIfCurrent(memtable, ColumnFamilyStore.FlushReason.ACCORD);\n            }\n            catch (Throwable t)\n            {\n                logger.warn(\"Failed to flush {}.{} for a waiting durability report\", cfs.getKeyspaceName(), cfs.name, t);\n            }\n            finally\n            {\n                awaitingFlush.remove(cfs);\n            }\n        }\n    }\n\n    static void notifyInOrder(long memtableId, TableMetadata metadata, CommandStore commandStore, ReportDurable report)\n    {\n        ColumnFamilyStore cfs = Schema.instance.getColumnFamilyStoreInstance(metadata.id);\n        if (cfs == null)\n        {\n            notifyNow(commandStore, report);\n            return;\n        }\n        View view = cfs.getTracker().getView();\n        boolean notifyNow = true;","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/AccordDurableOnFlush.java#L184-L220","documentation":"When a durability report is waiting on a column family, AccordDurableOnFlush attempts to switch that CF's memtable to trigger a flush; if that throws, the failure is only logged as a warning and the CF is removed from awaitingFlush. Durability reporting proceeds without that CF's flush.","triggerScenarios":"flushWaitingCfs runs while the target CF's memtable reference is no longer current, or switchMemtableIfCurrent throws due to disk errors or shutdown in progress.","commonSituations":"Concurrent flush/shutdown racing the durability reporter; disk-full preventing new SSTable creation; CF dropped mid-wait.","solutions":["Check the logged cause for disk errors; free space or fix the failing disk","Verify the keyspace/CF still exists and was not dropped mid-operation","If shutdown-related, ignore; durability will be reconciled on restart"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// check disk headroom before flush-dependent operations\nlong usable = cfs.getDiskSpaceUsable();\nif (usable < minRequiredBytes) throw new IllegalStateException(\"insufficient disk for flush\");","typeGuard":null,"tryCatchPattern":"catch (Throwable t) { log.warn(\"flush for durability report failed\", t); /* durability reconciles on restart */ }","preventionTips":["Keep disk utilization below 80%","Avoid dropping tables while durability reports are pending","Watch flush-related warnings in logs"],"tags":["accord","flush","memtable","durability"],"backgroundTag":"database-write-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"}