stevenzwu commented on code in PR #16293:
URL: https://github.com/apache/iceberg/pull/16293#discussion_r4220986951


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1270,6 +1262,18 @@ public Builder addSnapshot(Snapshot snapshot) {
           snapshot.sequenceNumber(),
           lastSequenceNumber);
 
+      if (formatVersion >= MIN_FORMAT_VERSION_MONOTONIC_TIMESTAMPS && 
snapshot.parentId() != null) {
+        Snapshot parent = snapshotsById.get(snapshot.parentId());
+        if (parent != null) {
+          ValidationException.check(
+              snapshot.timestampMillis() > parent.timestampMillis(),
+              "Invalid snapshot timestamp %s: not after parent snapshot %s at 
%s",

Review Comment:
   parent snapshot id was already logged. the conflicting committing/child 
snapshot id wasn't really useful, as it wasn't committed. we can't inspect it 
from table history.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to