danielcweeks commented on code in PR #14398:
URL: https://github.com/apache/iceberg/pull/14398#discussion_r2683169695


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -424,8 +517,26 @@ public Table loadTable(SessionContext context, 
TableIdentifier identifier) {
     MetadataTableType metadataType;
     LoadTableResponse response;
     TableIdentifier loadedIdent;
+
+    Map<String, String> responseHeaders = Maps.newHashMap();
+    TableSupplierWithETag cachedTable =
+        tableCache.getIfPresent(SessionIdTableId.of(context.sessionId(), 
identifier));

Review Comment:
   I'm quite concerned that we're not taking into consideration the snapshot 
mode in the key.  The first like likely would only contain the refs and the a 
subsequent load to get the full snapshots would not load the full snapshot 
history. 
   
   You might be able to make the argument that servers should return different 
ETags for different snapshot modes, but the current spec does not reflect that 
(just references current metadata).  The other issue is that it might be 
difficult to produce the correct etag if the server needs to construct the body 
as opposed to just knowing the current state of the table hasn't changed.



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