{"record":{"id":"6fec2c924529b345","repo":"apache/seatunnel","slug":"skipped-error","errorCode":null,"errorMessage":"skipped error","messagePattern":"skipped error","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java","lineNumber":713,"sourceCode":"        }\n\n        log.warn(\n                \"The {} file format is incorrect. Please check the format in the compressed file.\",\n                fileName);\n        return false;\n    }\n\n    protected static InputStream safeSlice(InputStream in, long start, long length)\n            throws IOException {\n        if (start > 0) {\n            if (in instanceof Seekable) {\n                ((Seekable) in).seek(start);\n            } else {\n                long toSkip = start;\n                while (toSkip > 0) {\n                    long skipped = in.skip(toSkip);\n                    if (skipped <= 0) {\n                        throw new SeaTunnelException(\"skipped error\");\n                    }\n                    toSkip -= skipped;\n                }\n            }\n        }\n        if (length < 0) {\n            return in;\n        }\n        return new BoundedInputStream(in, length);\n    }\n\n    protected static BufferedReader createBomAwareBufferedReader(\n            InputStream inputStream, String encoding) throws IOException {\n        BOMInputStream bomInputStream =\n                new BOMInputStream(\n                        inputStream,\n                        ByteOrderMark.UTF_8,\n                        ByteOrderMark.UTF_16BE,","sourceCodeStart":695,"sourceCodeEnd":731,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java#L695-L731","documentation":"When positioning an input stream at a split's start offset and the stream is not Seekable, the code skips bytes in a loop; if InputStream.skip() returns <= 0 (cannot make progress) it throws SeaTunnelException(\"skipped error\") instead of looping forever.","triggerScenarios":"Reading a split with a non-zero start offset over an input stream that implements neither Seekable nor reliable skip — typically skip() returning 0 repeatedly on a wrapped/blocked stream inside an archive or custom filesystem stream.","commonSituations":"Non-seekable or partially-broken streams (e.g. certain compressed or network-backed streams) where skip() makes no progress; custom Hadoop-compatible filesystems with buggy stream implementations.","solutions":["Upgrade/replace the filesystem implementation so its streams support skip or Seekable.","Avoid reading splits with non-zero start offsets for this storage (e.g. disable split-based reads or use a format without offset positioning).","Check whether the underlying file/stream is truncated or the network connection stalled, and retry after fixing storage connectivity."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    read(split);\n} catch (SeaTunnelException e) {\n    if (\"skipped error\".equals(e.getMessage())) {\n        // reopen the stream or retry after checking storage health\n    }\n}","preventionTips":["Use storage backends whose streams implement Seekable/skip correctly","Monitor network stability to the filesystem (NFS/S3 gateways)","Retry transient stream failures at the job level"],"tags":["file","stream","io"],"backgroundTag":"file-read-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}