dimas-b commented on code in PR #6789: URL: https://github.com/apache/iceberg/pull/6789#discussion_r1122340208
########## nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java: ########## @@ -310,19 +312,28 @@ public Configuration getConf() { @VisibleForTesting String currentHash() { - return client.getRef().getHash(); + return refreshedClient().getRef().getHash(); } @VisibleForTesting String currentRefName() { - return client.getRef().getName(); + return refreshedClient().getRef().getName(); } @VisibleForTesting FileIO fileIO() { return fileIO; } + private NessieIcebergClient refreshedClient() { + try { + client.refresh(); Review Comment: Alternatively, since the code does not access the `client` field directly now (except for init and refresh), why not call the method simply `client()`? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org