apache/seatunnel · warning
Post-sync backup promoted an unexpected target version; oper
Error message
Post-sync backup promoted an unexpected target version; operation will be retried: splitId={}, source={}, target={}, checkpointId={} What it means
After promoting the staged file to the backup target, the enumerator validates that the promoted content matches the captured source version (length+mtime, or a SHA-256 content fingerprint when available). This WARN fires when the target exists but does not match the expected version, so the operation returns FAILED_RETRYABLE rather than declaring success over wrong data. It guards against overwriting or mistaking another file's content as the backup.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumerator.java:945
if (!isSinkTargetCommitted(ctx, op, checkpointId, stagingPath)) {
return handleRetryableStagedOperation(
ctx, op, checkpointId, stagingPath, "backup", stagingStatus);
}
ctx.sourceFs.renameFile(stagingPath, op.getBackupTargetPath(), false);
targetStatus = getFileStatusIfPresent(ctx.sourceFs, op.getBackupTargetPath());
if (targetStatus == null) {
log.warn(
"Post-sync backup promotion target is absent after rename; operation will be retried: "
+ "splitId={}, source={}, target={}, checkpointId={}",
op.getSplitId(),
maskUriUserInfo(op.getSourcePath()),
maskUriUserInfo(op.getBackupTargetPath()),
checkpointId);
return OpCommitResult.FAILED_RETRYABLE;
}
if (!isOperationContentMatched(ctx, op, op.getBackupTargetPath(), targetStatus)) {
log.warn(
"Post-sync backup promoted an unexpected target version; operation will be retried: "
+ "splitId={}, source={}, target={}, checkpointId={}",
op.getSplitId(),
maskUriUserInfo(op.getSourcePath()),
maskUriUserInfo(op.getBackupTargetPath()),
checkpointId);
return OpCommitResult.FAILED_RETRYABLE;
}
log.info(
"Post-sync backup completed: source={}, target={}, checkpointId={}, "
+ "capturedLen={}, capturedMtime={}",
maskUriUserInfo(op.getSourcePath()),
maskUriUserInfo(op.getBackupTargetPath()),
checkpointId,
op.getSourceLength(),
op.getSourceModificationTime());
return OpCommitResult.SUCCESS;View on GitHub (pinned to cf67b549a7)
Solutions
- Determine whether the source was rewritten concurrently; if so let the operation settle and re-check the versions in the log (expected vs actual len/mtime)
- Remove the mismatched target file so a clean retry can promote the correct staged version
- Enable/verify content fingerprinting (sourceContentFingerprint) so version checks are content-based instead of mtime-based, which is robust across filesystems
- Check for connector version changes that altered the fingerprint computation between checkpoint save and restore
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
// Compare content fingerprints before trusting a backup target
String fp = sha256Hex(fs.open(targetPath));
if (!fp.equals(op.getSourceContentFingerprint())) {
throw new IOException("Backup target version mismatch: " + targetPath);
} Try / catch
try {
verifyBackupContent(targetPath, expectedFingerprint);
} catch (IOException | NoSuchAlgorithmException e) {
// treat as retryable mismatch; do not delete the source based on a bad target
} Prevention
- Enable content fingerprinting so checks are content-based rather than len/mtime-based
- Prevent concurrent writers from mutating source files during post-sync operations
- Keep connector versions consistent between checkpoint save and restore (fingerprint algorithm)
When it happens
Trigger: targetStatus is non-null after promotion but isOperationContentMatched() fails: the target's len/mtime differ from op.getSourceLength()/getSourceModificationTime(), or its SHA-256 fingerprint differs from op.getSourceContentFingerprint().
Common situations: The source file was modified by a writer after the operation captured its version, so the backup legitimately holds a different version; a previous attempt's differently-versioned file occupies the target path; fingerprint algorithm or encoding mismatch after a connector upgrade.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- Post-sync backup failed: backup target path is empty, splitI
- Post-sync backup cannot determine completion because source,
- Post-sync backup promotion target is absent after rename; op
- Post-sync backup skipped because target already exists; sour
- Post-sync backup: rename-to-staging failed, will retry: sour
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/26e8bdf287362d20.
Report an issue: GitHub.