zhangshenghang commented on code in PR #10060:
URL: https://github.com/apache/seatunnel/pull/10060#discussion_r2535837964


##########
seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java:
##########
@@ -225,11 +225,22 @@ private void startLoad(String label) {
 
     @Override
     public void abortPrepare() {
-        if (dorisSinkConfig.getEnable2PC()) {
-            try {
+        try {
+            if (dorisSinkConfig.getEnable2PC()) {
                 dorisStreamLoad.abortPreCommit(labelPrefix, lastCheckpointId + 
1);
-            } catch (Exception e) {
-                throw new RuntimeException(e);
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        } finally {

Review Comment:
   It is not allowed to perform close in abortPrepare, and other connectors do 
not have such an implementation.
   How about implementing Closeable in Spark2.4?



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