apache/cassandra · warning

Failed to flush {}.{} for a waiting durability report

Error message

Failed to flush {}.{} for a waiting durability report

What it means

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.

Source

Thrown at src/java/org/apache/cassandra/service/accord/AccordDurableOnFlush.java:202

    {
        long flushIfCreatedBeforeNanos = nanoTime() - flushIfOlderThanNanos;
        for (ColumnFamilyStore cfs : awaitingFlush)
        {
            Memtable memtable = cfs.getTracker().getView().getCurrentMemtable();
            if (memtable.createdAtNanos() >= flushIfCreatedBeforeNanos)
                continue;

            try
            {
                if (!memtable.hasFlushListener())
                    continue;

                logger.debug("Flushing {}.{} as a durability report is waiting on it", cfs.getKeyspaceName(), cfs.name);
                cfs.switchMemtableIfCurrent(memtable, ColumnFamilyStore.FlushReason.ACCORD);
            }
            catch (Throwable t)
            {
                logger.warn("Failed to flush {}.{} for a waiting durability report", cfs.getKeyspaceName(), cfs.name, t);
            }
            finally
            {
                awaitingFlush.remove(cfs);
            }
        }
    }

    static void notifyInOrder(long memtableId, TableMetadata metadata, CommandStore commandStore, ReportDurable report)
    {
        ColumnFamilyStore cfs = Schema.instance.getColumnFamilyStoreInstance(metadata.id);
        if (cfs == null)
        {
            notifyNow(commandStore, report);
            return;
        }
        View view = cfs.getTracker().getView();
        boolean notifyNow = true;

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Check the logged cause for disk errors; free space or fix the failing disk
  2. Verify the keyspace/CF still exists and was not dropped mid-operation
  3. If shutdown-related, ignore; durability will be reconciled on restart
Defensive patterns

Strategy: try-catch

Validate before calling

// check disk headroom before flush-dependent operations
long usable = cfs.getDiskSpaceUsable();
if (usable < minRequiredBytes) throw new IllegalStateException("insufficient disk for flush");

Try / catch

catch (Throwable t) { log.warn("flush for durability report failed", t); /* durability reconciles on restart */ }

Prevention

When it happens

Trigger: flushWaitingCfs runs while the target CF's memtable reference is no longer current, or switchMemtableIfCurrent throws due to disk errors or shutdown in progress.

Common situations: Concurrent flush/shutdown racing the durability reporter; disk-full preventing new SSTable creation; CF dropped mid-wait.

Related errors


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