{"record":{"id":"82d4f515a7ebb415","repo":"apache/cassandra","slug":"validation-failed-in-endpoint","errorCode":null,"errorMessage":"Validation failed in {endpoint}","messagePattern":"Validation failed in (.+?)","errorType":"exception","errorClass":"RepairException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/repair/ValidationTask.java","lineNumber":77,"sourceCode":"    public void run()\n    {\n        RepairMessage.sendMessageWithFailureCB(ctx, notDone(this),\n                                               new ValidationRequest(desc, nowInSec, dontPurgeTombstones),\n                                               VALIDATION_REQ,\n                                               endpoint,\n                                               this::tryFailure);\n    }\n\n    /**\n     * Receive MerkleTrees from replica node.\n     *\n     * @param trees MerkleTrees that is sent from replica. Null if validation failed on replica node.\n     */\n    public synchronized void treesReceived(MerkleTrees trees)\n    {\n        if (trees == null)\n        {\n            tryFailure(RepairException.warn(desc, previewKind, \"Validation failed in \" + endpoint));\n        }\n        else if (!trySuccess(new TreeResponse(endpoint, trees)))\n        {\n            // If the task is done, just release the possibly off-heap trees and move along.\n            trees.release();\n        }\n    }\n\n    /**\n     * Release any trees already received by this task, and place it a state where any trees \n     * received subsequently will be properly discarded.\n     */\n    public synchronized void abort(Throwable reason)\n    {\n        if (!tryFailure(reason) && isSuccess())\n        {\n            try\n            {","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/repair/ValidationTask.java#L59-L95","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the replica endpoint's logs for Validator/ValidationComplete errors to find the root cause.","Free disk space / fix replica health (GC, heap) before re-running repair.","Retry the repair; validation is retried per task up to configured retry limits.","For huge partitions causing tree build failures, run scrub/cleanup and consider offline validation tools.","Reduce concurrent repairs/validation load on the replica."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Check replica health before repair:\n// nodetool tpstats (no backed-up validation stage), df -h, GC logs clean","typeGuard":null,"tryCatchPattern":"try {\n    repair(keyspace);\n} catch (RepairException e) {\n    if (e.getMessage().startsWith(\"Validation failed in\")) {\n        String replica = e.getMessage().replace(\"Validation failed in \", \"\");\n        // inspect that replica's logs, then retry repair\n    }\n}","preventionTips":["Keep replicas free of disk pressure and heavy compaction during repairs.","Watch replica heap/GC; validation of large partitions needs headroom.","Scrub/clean problematic SSTables before repairing.","Limit concurrent repairs per node."],"tags":["repair","merkle-tree","validation","cassandra"],"backgroundTag":"repair-validation-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"}