amogh-jahagirdar commented on code in PR #4071:
URL: https://github.com/apache/iceberg/pull/4071#discussion_r846910932
##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1300,20 +1346,13 @@ private void setBranchSnapshotInternal(Snapshot
snapshot, String branch) {
this.lastUpdatedMillis = isAddedSnapshot(snapshot.snapshotId()) ?
snapshot.timestampMillis() : System.currentTimeMillis();
- if (SnapshotRef.MAIN_BRANCH.equals(branch)) {
Review Comment:
Good point, I completely missed about the lastUpdated time. We can remove
the existing logic in setBranchSnapshotInternal and make it contained within
setRef. We would anyways want that because in case somebody updates main to a
new snapshot we should also update the last updated time.
Ok there are 3 cases here (I think this basically the same as what you said
but let me know if I'm wrong):
1.) New snapshot ( on any branch) we set the the lastUpdatedMillis to be the
"current time"
2.) Main snapshot gets updated. We should set the last updated only if it
hasn't previously been set (due to new snapshots)
3.) If set ref isn't called. As you mentioned here then we delegate to the
build time lastUpdatedMillis
--
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]