amogh-jahagirdar commented on code in PR #9310:
URL: https://github.com/apache/iceberg/pull/9310#discussion_r1428865937


##########
core/src/main/java/org/apache/iceberg/BaseMetadataTable.java:
##########
@@ -202,7 +204,7 @@ public Map<String, SnapshotRef> refs() {
 
   @Override
   public UUID uuid() {
-    return UUID.randomUUID();

Review Comment:
   Wow, I can't believe I wrote it like this originally :). Good fix, yes we do 
want a random UUID but it should be consistent across the same Metadata Table. 
   
   The only thing is if we extend this logic further is that the same base 
metadata table across different references won't return the same UUID. So for 
example "all manifests" for t1 may have a different UUID than "all manifests" 
for t1 in a different query.
   
   I don't really see a way around that without persisting the UUID somewhere 
(like for normal tables that's in the metadata) but considering metadata tables 
are really more logical tables, I think that's OK. If we wanted that strict 
definition for metadata tables, then we would have to throw an unsupported 
until we persisted those details somewhere.
   
   For now though, I think this change is good as is. It looks like in the next 
change you have the UUID is used as part of caching, in which case this fix 
should solve that.



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