pvary commented on issue #6630:
URL: https://github.com/apache/iceberg/issues/6630#issuecomment-1617384809

   Seems like a bug to me. When we are writing data to the IcebergSink, and 
there is no data come in for the specified `maxContinuousEmptyCommits` number 
of commits, then we try to commit an empty changeset with the following code in 
`lcebergFilesCommitter`:
   ```
       if (totalFiles != 0 || continuousEmptyCheckpoints % 
maxContinuousEmptyCommits == 0) {
         if (replacePartitions) {
           replacePartitions(pendingResults, summary, newFlinkJobId, 
operatorId, checkpointId);
         } else {
           commitDeltaTxn(pendingResults, summary, newFlinkJobId, operatorId, 
checkpointId);
         }
         continuousEmptyCheckpoints = 0;
       } else {
         LOG.info("Skip commit for checkpoint {} due to no data files or delete 
files.", checkpointId);
       }
   ```
   
   I think we might want to handle the zero commits with a different code path. 
Maybe we just switch this case to handled by `commitDeltaTxn` regardless of the 
`replacePartitions` value.
   
   I do not have enough time nowadays to write and test the patch, but if you 
have time to write it, I will try to find time to review it.
   
   CC: @stevenzwu, @hililiwei 


-- 
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]

Reply via email to