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


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -413,14 +521,34 @@ public Table loadTable(SessionContext context, 
TableIdentifier identifier) {
         // attempt to load a metadata table using the identifier's namespace 
as the base table
         TableIdentifier baseIdent = 
TableIdentifier.of(identifier.namespace().levels());
         try {
-          response = loadInternal(context, baseIdent, snapshotMode);
+          responseHeaders.clear();
+          cachedTable =
+              tableCache.getIfPresent(SessionIDTableID.of(context.sessionId(), 
baseIdent));
+
+          response =
+              loadInternal(
+                  context,
+                  baseIdent,
+                  snapshotMode,
+                  headersForLoadTable(cachedTable),

Review Comment:
   Thanks you for describing the use case @XJDKC !
   When the engine restarts, it's not enough to persist the ETag somewhere 
because in order to answer a loadTable call you need a table object too.
   Anyway, I still think that the scope of this PR should be as narrow as 
possible, and not exposing ETags is what we agreed on in the proposal doc. Once 
this work is done, further changes could be initiated.



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