apache/cassandra · error · RepairException

Validation failed in {endpoint}

Error message

Validation failed in {endpoint}

What it means

A ValidationTask awaited a Merkle tree response from replica 'endpoint'; the replica sent null meaning validation failed on that replica. The task is failed with a RepairException so the containing RepairSession and repair coordinator know the validation phase failed.

Source

Thrown at src/java/org/apache/cassandra/repair/ValidationTask.java:77

    public void run()
    {
        RepairMessage.sendMessageWithFailureCB(ctx, notDone(this),
                                               new ValidationRequest(desc, nowInSec, dontPurgeTombstones),
                                               VALIDATION_REQ,
                                               endpoint,
                                               this::tryFailure);
    }

    /**
     * Receive MerkleTrees from replica node.
     *
     * @param trees MerkleTrees that is sent from replica. Null if validation failed on replica node.
     */
    public synchronized void treesReceived(MerkleTrees trees)
    {
        if (trees == null)
        {
            tryFailure(RepairException.warn(desc, previewKind, "Validation failed in " + endpoint));
        }
        else if (!trySuccess(new TreeResponse(endpoint, trees)))
        {
            // If the task is done, just release the possibly off-heap trees and move along.
            trees.release();
        }
    }

    /**
     * Release any trees already received by this task, and place it a state where any trees 
     * received subsequently will be properly discarded.
     */
    public synchronized void abort(Throwable reason)
    {
        if (!tryFailure(reason) && isSuccess())
        {
            try
            {

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Check the replica endpoint's logs for Validator/ValidationComplete errors to find the root cause.
  2. Free disk space / fix replica health (GC, heap) before re-running repair.
  3. Retry the repair; validation is retried per task up to configured retry limits.
  4. For huge partitions causing tree build failures, run scrub/cleanup and consider offline validation tools.
  5. Reduce concurrent repairs/validation load on the replica.
Defensive patterns

Strategy: retry

Validate before calling

// Check replica health before repair:
// nodetool tpstats (no backed-up validation stage), df -h, GC logs clean

Try / catch

try {
    repair(keyspace);
} catch (RepairException e) {
    if (e.getMessage().startsWith("Validation failed in")) {
        String replica = e.getMessage().replace("Validation failed in ", "");
        // inspect that replica's logs, then retry repair
    }
}

Prevention

When it happens

Trigger: treesReceived(null) is called when the replica-side validator errored (e.g. exception while building Merkle trees, compaction interference, OOM) or the tree response never arrived/was corrupt.

Common situations: Replica under heavy compaction or GC pressure, disk full on replica, OOM during tree building on large partitions, or network interruption dropping the ValidationComplete response.

Related errors


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