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


##########
format/spec.md:
##########
@@ -1908,6 +1910,12 @@ Reading v4 metadata:
 * Relative paths must be resolved against the table location before use (see 
[Path Resolution](#path-resolution))
 * When `location` is omitted, the table location must be provided (see [Table 
Location Specification](#table-location-specification))
 
+Snapshot timestamp changes:
+
+* A snapshot's `timestamp-ms` must be strictly greater than the `timestamp-ms` 
of its parent snapshot on the same branch.
+* The requirement applies only to snapshots committed while the table is at 
format version 4 or higher; snapshots that existed before a table was upgraded 
to v4 are not constrained.

Review Comment:
   Today, time travel using timestamp is already sort of broken today if the 
snapshot timestamp is non monotonic.
   
   > how about we say first commit post upgrade is ok to not follow assuming 
that commit is true to the commit time and then after that we can enforce the 
constraints
   
   This assumes v4 writers would have better client clocks than v3 writers, 
which is not true. We will continue to have the possibility of clock drift 
after v4 upgrade. 
   
   This spec and [commit implementation 
change](https://github.com/apache/iceberg/pull/16293/changes) will ensure that 
we will always monotonic commit timestamp for snapshots committed in v4 version.
   
   I am not sure special treatment of the first commit adds significant value 
or protection.



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