{"record":{"id":"8f4f96a1684141f4","repo":"apache/hadoop","slug":"partial-crc-does-not-match-value-computed-the","errorCode":null,"errorMessage":"Partial CRC {} does not match value computed the  last time file was closed {}","messagePattern":"Partial CRC (.+?) does not match value computed the  last time file was closed (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java","lineNumber":1232,"sourceCode":"      instr.readChecksumFully(crcbuf, 0, crcbuf.length);\n    }\n\n    // compute crc of partial chunk from data read in the block file.\n    final Checksum partialCrc = DataChecksum.newDataChecksum(\n        diskChecksum.getChecksumType(), diskChecksum.getBytesPerChecksum());\n    partialCrc.update(buf, 0, sizePartialChunk);\n    if (LOG.isDebugEnabled()) {\n      LOG.debug(\"Read in partial CRC chunk from disk for \" + block);\n    }\n\n    // paranoia! verify that the pre-computed crc matches what we\n    // recalculated just now\n    if (partialCrc.getValue() != checksum2long(crcbuf)) {\n      String msg = \"Partial CRC \" + partialCrc.getValue() +\n                   \" does not match value computed the \" +\n                   \" last time file was closed \" +\n                   checksum2long(crcbuf);\n      throw new IOException(msg);\n    }\n    return partialCrc;\n  }\n\n  /** The caller claims the ownership of the replica handler. */\n  private ReplicaHandler claimReplicaHandler() {\n    ReplicaHandler handler = replicaHandler;\n    replicaHandler = null;\n    return handler;\n  }\n\n  private enum PacketResponderType {\n    NON_PIPELINE, LAST_IN_PIPELINE, HAS_DOWNSTREAM_IN_PIPELINE\n  }\n\n  /**\n   * Processes responses from downstream datanodes in the pipeline\n   * and sends back replies to the originator.","sourceCodeStart":1214,"sourceCodeEnd":1250,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java#L1214-L1250","documentation":"Error \"Partial CRC {} does not match value computed the  last time file was closed {}\" thrown in apache/hadoop.","triggerScenarios":"While finalizing a partially written block, the recomputed CRC of the last partial chunk differs from the CRC computed when the file was last closed.","commonSituations":"The CRC of a partially written chunk differed from the CRC recorded when the file was last closed, indicating on-disk corruption. Check the storage volume health.","solutions":["Check disk and memory health on the DataNode; a partial CRC mismatch on close indicates data written earlier no longer matches its recorded CRC.","Delete the corrupt replica so the NameNode schedules re-replication from a healthy copy."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}