HeartSaVioR commented on a change in pull request #1429:
URL: https://github.com/apache/iceberg/pull/1429#discussion_r485242016
##########
File path:
core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java
##########
@@ -72,10 +73,14 @@ public int currentVersion() {
@Override
public TableMetadata refresh() {
+ boolean currentMetadataWasAvailable = currentMetadata != null;
try {
doRefresh();
} catch (NoSuchTableException e) {
- LOG.warn("Could not find the table during refresh, setting current
metadata to null", e);
+ if (currentMetadataWasAvailable) {
+ LOG.warn("Could not find the table during refresh, setting current
metadata to null", e);
+ }
+
currentMetadata = null;
Review comment:
I'm not 100% certain that re-setting fields is valid only for when the
if statement is true. If then we can move things into if statement, but
otherwise I guess it can be left as it is. At least leaving it as it is won't
hurt anything.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]