raunaqmorarka commented on code in PR #18188:
URL: https://github.com/apache/iceberg/pull/18188#discussion_r4093888817
##########
core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java:
##########
@@ -222,9 +286,17 @@ public void commit(TableMetadata base, TableMetadata
metadata) {
// the error handler will throw necessary exceptions like
CommitFailedException and
// UnknownCommitStateException
// TODO: ensure that the HTTP client lib passes HTTP client errors to the
error handler
+ Map<String, String> responseHeaders =
Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
Review Comment:
Same reason as the other TreeMap thread.
##########
core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java:
##########
@@ -315,6 +387,8 @@ private TableMetadata
updateCurrentMetadata(LoadTableResponse response) {
this.current = checkUUID(current, response.tableMetadata());
}
+ this.eTag = responseETag;
Review Comment:
They stay paired, since an unchanged location means the response carries the
same metadata as `current`. The ETag can still change, for example
`RESTCatalogAdapter` keys it on query params, which differ between loadTable
and refresh. Setting it only on a location change keeps sending the loadTable
ETag, so refresh never gets a 304 (three of the new tests fail that way).
--
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]