{"record":{"id":"183e0a8c6a37ef93","repo":"apache/hadoop","slug":"bad-edit-log-manifest-expected-txid-expectedt","errorCode":null,"errorMessage":"Bad edit log manifest (expected txid = ${expectedTxId}: ${manifest}","messagePattern":"Bad edit log manifest \\(expected txid = (.+?): (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java","lineNumber":405,"sourceCode":"   * @throws IOException\n   */\n  static boolean downloadCheckpointFiles(\n      final URL nnHostPort,\n      final FSImage dstImage,\n      final CheckpointSignature sig,\n      final RemoteEditLogManifest manifest\n  ) throws IOException {\n    \n    // Sanity check manifest - these could happen if, eg, someone on the\n    // NN side accidentally rmed the storage directories\n    if (manifest.getLogs().isEmpty()) {\n      throw new IOException(\"Found no edit logs to download on NN since txid \" \n          + sig.mostRecentCheckpointTxId);\n    }\n    \n    long expectedTxId = sig.mostRecentCheckpointTxId + 1;\n    if (manifest.getLogs().get(0).getStartTxId() != expectedTxId) {\n      throw new IOException(\"Bad edit log manifest (expected txid = \" +\n          expectedTxId + \": \" + manifest);\n    }\n\n    try {\n        Boolean b = UserGroupInformation.getCurrentUser().doAs(\n            new PrivilegedExceptionAction<Boolean>() {\n  \n          @Override\n          public Boolean run() throws Exception {\n            dstImage.getStorage().cTime = sig.cTime;\n\n            // get fsimage\n            if (sig.mostRecentCheckpointTxId ==\n                dstImage.getStorage().getMostRecentCheckpointTxId()) {\n              LOG.info(\"Image has not changed. Will not download image.\");\n            } else {\n              LOG.info(\"Image has changed. Downloading updated image from NN.\");\n              MD5Hash downloadedHash = TransferFsImage.downloadImageToStorage(","sourceCodeStart":387,"sourceCodeEnd":423,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java#L387-L423","documentation":"Error \"Bad edit log manifest (expected txid = ${expectedTxId}: ${manifest}\" thrown in apache/hadoop.","triggerScenarios":"The downloaded edit log manifest does not start at the expected transaction ID.","commonSituations":"Partially failed edits transfer or mixed storage directories with divergent txid ranges.","solutions":["Check JournalNode/NameNode edit log health and storage; a corrupted or inconsistent edit manifest indicates missing or damaged edit segments."],"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-22T20:17:22.307Z"}