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


##########
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:
   In Spark 2.4, the `DataWriter `interface does not extend Closeable, so when 
the test case runs on the Spark 2.4 engine and the job fails, the` close() 
`method of the `DorisSinkWriter  `is never invoked. As a result, the threads 
inside the `DorisSinkWriter `remain alive and prevent the SeaTunnel job from 
terminating. Therefore, releasing resources here.
   I'm not sure if this is a good fix.



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