junmuz commented on code in PR #11017:
URL: https://github.com/apache/paimon/pull/11017#discussion_r4566988345
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -1817,6 +1946,24 @@ private Pair<Boolean, CommitCallback.Context>
rollbackToAsLatestOnceWithoutLock(
// the snapshots between the target and the previous latest, breaking
the global uniqueness
// of _ROW_ID. Keep the larger of the previous latest and the target
nextRowId.
Long nextRowId = maxNextRowId(latest.nextRowId(),
targetSnapshot.nextRowId());
+ Map<String, String> rollbackProperties =
+ SequenceSnapshotProperties.mergeGuardMaxSequenceNumber(
+ targetSnapshot.properties(), latest, deltaFiles,
false);
+ rollbackProperties =
+ DeleteOrderingGuardGeneration.merge(
+ rollbackProperties,
+ latest,
+ options.deleteOrderingGuardsEnabled(),
+ true,
+ null,
+ partitionType);
+ rollbackProperties =
+ DeleteOrderingGuardPartitions.merge(
+ rollbackProperties,
+ targetSnapshot,
Review Comment:
Fixed in `56d1206`. `rollbackToAsLatest` now validates the target guard
segment headers against the current persisted ordering/deletion policy before
publication, and revalidates if the schema changes during preparation. Added
compatible and incompatible policy cases with capture enabled and disabled.
Incompatible restoration leaves the current head unchanged and readable;
compatible restoration with payload schema evolution succeeds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]