pvary commented on code in PR #8555:
URL: https://github.com/apache/iceberg/pull/8555#discussion_r1325724334
##########
flink/v1.17/flink/src/main/java/org/apache/iceberg/flink/sink/IcebergFilesCommitter.java:
##########
@@ -237,15 +250,20 @@ public void notifyCheckpointComplete(long checkpointId)
throws Exception {
// For step#4, we don't need to commit iceberg table again because in
step#3 we've committed all
// the files,
// Besides, we need to maintain the max-committed-checkpoint-id to be
increasing.
- if (checkpointId > maxCommittedCheckpointId) {
- LOG.info("Checkpoint {} completed. Attempting commit.", checkpointId);
- commitUpToCheckpoint(dataFilesPerCheckpoint, flinkJobId,
operatorUniqueId, checkpointId);
- this.maxCommittedCheckpointId = checkpointId;
- } else {
- LOG.info(
- "Skipping committing checkpoint {}. {} is already committed.",
- checkpointId,
- maxCommittedCheckpointId);
+ try {
+ if (checkpointId > maxCommittedCheckpointId) {
+ LOG.info("Checkpoint {} completed. Attempting commit.", checkpointId);
+ commitUpToCheckpoint(dataFilesPerCheckpoint, flinkJobId,
operatorUniqueId, checkpointId);
+ this.maxCommittedCheckpointId = checkpointId;
+ } else {
+ LOG.info(
+ "Skipping committing checkpoint {}. {} is already committed.",
+ checkpointId,
+ maxCommittedCheckpointId);
+ }
+ } finally {
+ // reload the table in case new configuration is needed
+ this.table = tableSupplier.get();
Review Comment:
Shall we update the
`this.manifestOutputFileFactory.manifestOutputFileFactory` here, so we do not
need to provide the table at every 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]