mxm commented on code in PR #18419:
URL: https://github.com/apache/iceberg/pull/18419#discussion_r4219235435
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableUpdater.java:
##########
@@ -107,8 +107,11 @@ private void findOrCreateBranch(TableIdentifier
identifier, String branch) {
try {
table.manageSnapshots().createBranch(branch).commit();
LOG.info("Branch {} for {} created", branch, identifier);
- } catch (CommitFailedException e) {
- table.refresh();
+ } catch (CommitFailedException | IllegalArgumentException e) {
+ if (!table.refs().containsKey(branch)) {
+ table.refresh();
+ }
+
Review Comment:
Could we move this check after the `loadTable`? I think that way we should
be able to remove the IllegalArgumentException entirely because we do not
refresh the table locally after the loadTable call.
--
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]