manuzhang commented on code in PR #14618:
URL: https://github.com/apache/iceberg/pull/14618#discussion_r2616387277


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/SinkWriter.java:
##########
@@ -65,7 +77,20 @@ public SinkWriterResult completeWrite() {
   }
 
   public void save(Collection<SinkRecord> sinkRecords) {
-    sinkRecords.forEach(this::save);
+    for (SinkRecord record : sinkRecords) {
+      try {
+        this.save(record);
+      } catch (DataException ex) {
+        if (this.reporter != null) {
+          this.reporter.report(record, ex);
+        }
+        if 
(this.config.errorTolerance().equalsIgnoreCase(ErrorTolerance.ALL.toString())) {
+          LOG.error("An error occurred while saving record...", ex);

Review Comment:
   It would be worth mentioning the error is tolerated and how to not to 
tolerate with a config.



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