{"record":{"id":"64bfb6f992b183e6","repo":"apache/hadoop","slug":"expected-to-load-in-parallel-but-loaded-th","errorCode":null,"errorMessage":"Expected to load {} in parallel, but loaded {}. The image may be corrupt.","messagePattern":"Expected to load (.+?) in parallel, but loaded (.+?)\\. The image may be corrupt\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormatPBINode.java","lineNumber":461,"sourceCode":"            try {\n              ins.close();\n            } catch (IOException ioe) {\n              LOG.warn(\"Failed to close the input stream, ignoring\", ioe);\n            }\n          }\n        });\n      }\n      try {\n        latch.await();\n      } catch (InterruptedException e) {\n        LOG.info(\"Interrupted waiting for countdown latch\");\n      }\n      if (exceptions.size() != 0) {\n        LOG.error(\"{} exceptions occurred loading INodes\", exceptions.size());\n        throw exceptions.get(0);\n      }\n      if (totalLoaded.get() != expectedInodes) {\n        throw new IOException(\"Expected to load \"+expectedInodes+\" in \" +\n            \"parallel, but loaded \"+totalLoaded.get()+\". The image may \" +\n            \"be corrupt.\");\n      }\n      LOG.info(\"Completed loading all INode sections. Loaded {} inodes.\",\n          totalLoaded.get());\n    }\n\n    /**\n     * Load the under-construction files section, and update the lease map\n     */\n    void loadFilesUnderConstructionSection(InputStream in) throws IOException {\n      // Leases are added when the inode section is loaded. This section is\n      // still read in for compatibility reasons.\n      while (true) {\n        FileUnderConstructionEntry entry = FileUnderConstructionEntry\n            .parseDelimitedFrom(in);\n        if (entry == null) {\n          break;","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormatPBINode.java#L443-L479","documentation":"Error \"Expected to load {} in parallel, but loaded {}. The image may be corrupt.\" thrown in apache/hadoop.","triggerScenarios":"Parallel fsimage loading where the total number of inodes actually loaded differs from the count recorded in the image, indicating corruption.","commonSituations":"See trigger scenarios.","solutions":["The fsimage may be corrupt; reload from a different storage directory or re-copy the image from a healthy NameNode."],"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"}