laserninja commented on code in PR #10536:
URL: https://github.com/apache/gravitino/pull/10536#discussion_r2985543939
##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/rest/IcebergTableOperations.java:
##########
@@ -311,13 +313,23 @@ public Response loadTable(
TableIdentifier tableIdentifier = TableIdentifier.of(icebergNS,
tableName);
IcebergRequestContext context =
new IcebergRequestContext(httpServletRequest(), catalogName,
isCredentialVending);
+
+ // Fast path: if client sent If-None-Match, try to resolve ETag
without full table load
+ if (ifNoneMatch != null && !ifNoneMatch.isEmpty()) {
+ String metadataLocation =
+ tableOperationDispatcher.getTableMetadataLocation(context,
tableIdentifier);
Review Comment:
Thanks! Fixed it. when the catalog doesn't support
'getTableMetadataLocation', we now fall back to computing the ETag from the
'loadTable' response and still return 304 Not Modified when it matches
If-None-Match.
--
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]