{"record":{"id":"90aafa86c10656f0","repo":"apache/seatunnel","slug":"fallback-content-comparison-failed-fallback-to-co-90aafa","errorCode":null,"errorMessage":"Fallback content comparison failed, fallback to COPY. source={}, target={}","messagePattern":"Fallback content comparison failed, fallback to COPY\\. source=(.+?), target=(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumerator.java","lineNumber":1911,"sourceCode":"                    }\n\n                    if (checksumException != null\n                            || sourceChecksum == null\n                            || targetChecksum == null) {\n                        warnChecksumUnavailableOnce(\n                                sourceFilePath, targetFilePath, checksumException);\n                        try {\n                            boolean sameContent = fileContentEquals(sourceFilePath, targetFilePath);\n                            if (sameContent && log.isDebugEnabled()) {\n                                log.debug(\n                                        \"Update sync mode skipped file: source={}, target={}, reason={}\",\n                                        maskUriUserInfo(sourceFilePath),\n                                        maskUriUserInfo(targetFilePath),\n                                        \"strict checksum: content equal (checksum unavailable)\");\n                            }\n                            return !sameContent;\n                        } catch (Exception e) {\n                            log.warn(\n                                    \"Fallback content comparison failed, fallback to COPY. source={}, target={}\",\n                                    maskUriUserInfo(sourceFilePath),\n                                    maskUriUserInfo(targetFilePath),\n                                    e);\n                            return true;\n                        }\n                    }\n                    if (checksumEquals(sourceChecksum, targetChecksum)) {\n                        if (log.isDebugEnabled()) {\n                            log.debug(\n                                    \"Update sync mode skipped file: source={}, target={}, reason={}\",\n                                    maskUriUserInfo(sourceFilePath),\n                                    maskUriUserInfo(targetFilePath),\n                                    \"strict checksum: checksum equal\");\n                        }\n                        return false;\n                    }\n                    return true;","sourceCodeStart":1893,"sourceCodeEnd":1929,"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/split/ContinuousMultipleTableFileSourceSplitEnumerator.java#L1893-L1929","documentation":"This is a WARN log emitted by ContinuousMultipleTableFileSourceSplitEnumerator when the incremental file-sync logic tried to compare a source file and its target copy by content and the comparison itself threw an exception. Since equality cannot be proven, the enumerator conservatively treats the files as different (returns true) so the file is re-copied via COPY — favoring correctness over skipping. It is a degraded-path warning, not a job-failing error.","triggerScenarios":"Occurs during the 'should copy?' decision path when file checksums are unavailable and the code falls back to a direct content comparison (streaming read of source and target), and that comparison throws — e.g. the target file disappears mid-read, a filesystem/IO error occurs while reading either URI, or the storage backend rejects the read (permission/timeout).","commonSituations":"Target file deleted or truncated by another job while the enumerator compares; transient HDFS/S3/OSS read failures; permission issues on the target path; network blips to object storage during content streaming.","solutions":["Inspect the full stack trace attached to this WARN to find the underlying IO/permission error on source or target path.","Verify the target directory/path is stable and not being concurrently modified or cleaned by another process.","Check read permissions and connectivity for both sourceFilePath and targetFilePath URIs.","If checksums can be enabled/supported by the filesystem, prefer the checksum path so content comparison (and this failure mode) is avoided."],"exampleFix":"// before: content comparison throws, file is redundantly re-copied every cycle\nreturn !sameContent;\n// after: fix the underlying cause, e.g. ensure target is not concurrently removed\n// (no code change required; the library already falls back safely to COPY)","handlingStrategy":"fallback","validationCode":"// Verify both paths are readable before running the sync job\nFileSystem src = sourceFilePath.getFileSystem(conf);\nFileSystem tgt = targetFilePath.getFileSystem(conf);\nif (!src.exists(sourceFilePath) || !tgt.exists(targetFilePath)) {\n    throw new IOException(\"source or target missing before comparison\");\n}\ntry (FSDataInputStream a = src.open(sourceFilePath);\n     FSDataInputStream b = tgt.open(targetFilePath)) { /* probe read */ }","typeGuard":null,"tryCatchPattern":"try {\n    boolean different = compareContents(sourceFilePath, targetFilePath);\n} catch (Exception e) {\n    log.warn(\"content comparison failed, defaulting to COPY\", e);\n    boolean different = true; // safe fallback\n}","preventionTips":["Avoid concurrent writers/deleters on the sync target directory.","Ensure read permissions on both source and target URIs.","Prefer filesystems with checksum support to avoid the comparison path entirely.","Monitor this WARN's attached stack trace for recurring IO/permission root causes."],"tags":["file","io","fallback","checksum","log-warning"],"backgroundTag":"checksum-mismatch","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"}