sv2000 commented on a change in pull request #3419:
URL: https://github.com/apache/gobblin/pull/3419#discussion_r745842141



##########
File path: 
gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/GobblinMCEWriter.java
##########
@@ -344,12 +347,13 @@ private void flush(String dbName, String tableName) 
throws IOException {
           writer.flush(dbName, tableName);
         } catch (IOException e) {
           meetException = true;
-          addException(e, tableString, dbName, tableName);
+          writer.reset(dbName, tableName);
+          addOrThrowException(e, tableString, dbName, tableName);
         }
       }
     }
-    if (!meetException && 
datasetErrorMap.containsKey(tableOperationTypeMap.get(tableString).datasetName)
-        && 
datasetErrorMap.get(tableOperationTypeMap.get(tableString).datasetName).containsKey(tableString))
 {
+    if (!meetException && 
datasetErrorMap.containsKey(tableOperationTypeMap.get(tableString).datasetPath)

Review comment:
       So the if condition is hard to understand. What is the scenario this is 
trying to address? Can we add a comment here to help the reader understand?




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


Reply via email to