apache/cassandra · warning

Some hints were not written before shutdown. This is not su

Error message

Some hints were not written before shutdown.  This is not supposed to happen.  You should (a) run repair, and (b) file a bug report

What it means

On shutdown, StorageService calls verifyNoHintsInProgress, which checks totalHintsInProgress. Hints being handed out should have completed before shutdown finishes; a nonzero count means some hint writes did not flush, and the target replicas may miss writes until repaired. Because this 'is not supposed to happen', it is logged as a warning and the message asks the operator to run repair and file a bug.

Source

Thrown at src/java/org/apache/cassandra/service/StorageProxy.java:3309

    public int getMaxHintsInProgress()
    {
        return maxHintsInProgress;
    }

    public void setMaxHintsInProgress(int qs)
    {
        maxHintsInProgress = qs;
    }

    public int getHintsInProgress()
    {
        return (int) StorageMetrics.totalHintsInProgress.getCount();
    }

    public void verifyNoHintsInProgress()
    {
        if (getHintsInProgress() > 0)
            logger.warn("Some hints were not written before shutdown.  This is not supposed to happen.  You should (a) run repair, and (b) file a bug report");
    }

    private static AtomicInteger getHintsInProgressFor(InetAddressAndPort destination)
    {
        try
        {
            return hintsInProgress.load(destination);
        }
        catch (Exception e)
        {
            throw new AssertionError(e);
        }
    }

    public static void submitHintForRetryOnDifferentSystem(Mutation mutation)
    {
        submitHint(mutation, ImmutableSet.of(HintsService.RETRY_ON_DIFFERENT_SYSTEM_ADDRESS), null);
    }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Run repair on the affected ranges after restart (the message's first instruction) to close any missed writes
  2. File a bug report with logs as the message requests, including the destination replicas involved
  3. Avoid restarting while hints backlog is large; check nodetool hints / totalHintsInProgress before planned restarts
  4. Upgrade to the latest patch release — several hint-draining races have been fixed over time

Example fix

// before
$ nodetool stop   # hints still in flight -> warning

// after (safe restart procedure)
$ nodetool tpstats | grep -i hint        # verify no hint activity
$ nodetool drain && nodetool stop
$ nodetool repair -pr myks               # after restart
Defensive patterns

Strategy: retry

Validate before calling

// before planned shutdown
if (storageProxy.getHintsInProgress() > 0) {
    waitUntil(() -> storageProxy.getHintsInProgress() == 0, timeout);
    // only then drain/stop
}

Try / catch

try {
    node.shutdown();
} finally {
    if (wasLogged("Some hints were not written before shutdown"))
        runRepair(node); // close missed hint windows
}

Prevention

When it happens

Trigger: Node shutdown (decommission, stop, restart) while getHintsInProgress() > 0 — i.e., hint handoff writes were still in flight at verifyNoHintsInProgress time, typically due to a slow/stalled destination or a race in hint dispatch draining.

Common situations: Restarting a busy node with many pending hints to an unreachable/slow replica; shutdown timeouts racing hint dispatch threads; known race conditions in hint delivery during rolling restarts.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


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