{"record":{"id":"b8afa89755ba2ede","repo":"apache/hadoop","slug":"inprogressok-false-but-selectinputstreams-retur","errorCode":null,"errorMessage":"inProgressOk = false, but selectInputStreams returned an in-progress edit log input stream ({})","messagePattern":"inProgressOk = false, but selectInputStreams returned an in-progress edit log input stream \\((.+?)\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java","lineNumber":1817,"sourceCode":"  /**\n   * Check for gaps in the edit log input stream list.\n   * Note: we're assuming that the list is sorted and that txid ranges don't\n   * overlap.  This could be done better and with more generality with an\n   * interval tree.\n   */\n  private void checkForGaps(List<EditLogInputStream> streams, long fromTxId,\n      long toAtLeastTxId, boolean inProgressOk) throws IOException {\n    Iterator<EditLogInputStream> iter = streams.iterator();\n    long txId = fromTxId;\n    while (true) {\n      if (txId > toAtLeastTxId) return;\n      if (!iter.hasNext()) break;\n      EditLogInputStream elis = iter.next();\n      if (elis.getFirstTxId() > txId) break;\n      long next = elis.getLastTxId();\n      if (next == HdfsServerConstants.INVALID_TXID) {\n        if (!inProgressOk) {\n          throw new RuntimeException(\"inProgressOk = false, but \" +\n              \"selectInputStreams returned an in-progress edit \" +\n              \"log input stream (\" + elis + \")\");\n        }\n        // We don't know where the in-progress stream ends.\n        // It could certainly go all the way up to toAtLeastTxId.\n        return;\n      }\n      txId = next + 1;\n    }\n    throw new IOException(String.format(\"Gap in transactions. Expected to \"\n        + \"be able to read up until at least txid %d but unable to find any \"\n        + \"edit logs containing txid %d\", toAtLeastTxId, txId));\n  }\n\n  /** \n   * Close all the streams in a collection\n   * @param streams The list of streams to close\n   */","sourceCodeStart":1799,"sourceCodeEnd":1835,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java#L1799-L1835","documentation":"Error \"inProgressOk = false, but selectInputStreams returned an in-progress edit log input stream ({})\" thrown in apache/hadoop.","triggerScenarios":"During edit log tailing, an in-progress stream was returned even though in-progress input streams were not permitted.","commonSituations":"See trigger scenarios.","solutions":["This indicates an internal inconsistency in edit log selection; retry the operation and inspect NameNode logs for the stream source."],"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"}