{"record":{"id":"9d678ca07e2224ee","repo":"apache/hadoop","slug":"failed-to-sufficiently-replicate-min-minreplicat","errorCode":null,"errorMessage":"Failed to sufficiently replicate: min=<minReplication> actual=<opSet.cardinality()>","messagePattern":"Failed to sufficiently replicate: min=<minReplication> actual=<opSet\\.cardinality\\(\\)>","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/NflyFSystem.java","lineNumber":392,"sourceCode":"      }\n      mayThrow(ioExceptions);\n    }\n\n    @Override\n    public void close() throws IOException {\n      final List<IOException> ioExceptions = new ArrayList<IOException>();\n      for (int i = opSet.nextSetBit(0);\n           i >= 0;\n           i = opSet.nextSetBit(i + 1)) {\n        try {\n          outputStreams[i].close();\n        } catch (Throwable t) {\n          osException(i, \"close\", t, ioExceptions);\n        }\n      }\n      if (opSet.cardinality() < minReplication) {\n        cleanupAllTmpFiles();\n        throw new IOException(\"Failed to sufficiently replicate: min=\"\n            + minReplication + \" actual=\" + opSet.cardinality());\n      } else {\n        commit();\n      }\n    }\n\n    private void cleanupAllTmpFiles() throws IOException {\n      for (int i = 0; i < outputStreams.length; i++) {\n        try {\n          nodes[i].fs.delete(tmpPath);\n        } catch (Throwable t) {\n          processThrowable(nodes[i], \"delete\", t, null, tmpPath);\n        }\n      }\n    }\n\n    private void commit() throws IOException {\n      final List<IOException> ioExceptions = new ArrayList<IOException>();","sourceCodeStart":374,"sourceCodeEnd":410,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/NflyFSystem.java#L374-L410","documentation":"Error \"Failed to sufficiently replicate: min=<minReplication> actual=<opSet.cardinality()>\" thrown in apache/hadoop.","triggerScenarios":"Thrown by NflyFSystem after a write/repair when fewer replicas than minReplication succeeded, i.e. the operation could not be sufficiently replicated.","commonSituations":"See trigger scenarios.","solutions":["Check the health of the Nfly target filesystems; fewer replicas than minReplication succeeded.","Lower minReplication or fix the failing target filesystem writes."],"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"}