{"record":{"id":"54cc2a478685dab9","repo":"prestodb/presto","slug":"s3-select-request-was-incomplete-as-end-event-was","errorCode":null,"errorMessage":"S3 Select request was incomplete as End Event was not received","messagePattern":"S3 Select request was incomplete as End Event was not received","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectLineRecordReader.java","lineNumber":251,"sourceCode":"                        }\n                    });\n        }\n        catch (Exception e) {\n            throwIfInstanceOf(e, IOException.class);\n            throwIfUnchecked(e);\n            throw new RuntimeException(e);\n        }\n    }\n\n    @Override\n    public synchronized boolean next(LongWritable key, Text value)\n            throws IOException\n    {\n        while (true) {\n            int bytes = readLine(value);\n            if (bytes <= 0) {\n                if (!selectClient.isRequestComplete()) {\n                    throw new IOException(\"S3 Select request was incomplete as End Event was not received\");\n                }\n                return false;\n            }\n            recordsFromS3++;\n            if (recordsFromS3 > processedRecords) {\n                position += bytes;\n                processedRecords++;\n                key.set(processedRecords);\n                return true;\n            }\n        }\n    }\n\n    @Override\n    public LongWritable createKey()\n    {\n        return new LongWritable();\n    }","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectLineRecordReader.java#L233-L269","documentation":"Thrown when S3 Select's response stream ends without the mandatory End Event frame, meaning the S3 Select request terminated prematurely (network drop, S3-side abort, or truncated stream). next() detects that isRequestComplete() is false after exhausting buffered lines and fails fast rather than silently returning partial rows.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectLineRecordReader.java:251 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the split/query; a missing End Event is usually a transient S3 or network failure","Check S3 request metrics and bucket error rates for throttling (SlowDown) or 5xx responses","Verify proxy/firewall/timeout settings are not cutting the HTTP response stream short","Reduce split size or concurrency if throttling is suspected"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}