nzw921rx opened a new issue, #11584:
URL: https://github.com/apache/seatunnel/issues/11584

   ### Search before asking
   
   - [x] I had searched in the issues and found no similar issues.
   
   ### What happened
   
   The Kudu connector can leave its Netty event-loop threads running after a 
Flink job has finished and the user-code classloader has been released.
   
   Kudu 1.15 calls `shutdownGracefully()` when `KuduClient.close()` runs, but 
the close call returns before the event-loop executor has fully terminated. 
Flink can then unload the connector JAR while the remaining Kudu threads are 
still completing channel and promise cleanup.
   
   This produces repeated `NoClassDefFoundError` exceptions from `kudu-nio-*` 
threads. In the Kudu E2E suite, which starts many Flink jobs sequentially, the 
leaked asynchronous cleanup also correlates with intermittent JobManager 
heartbeat and blob-download timeouts. A failed run often passes after rerunning.
   
   The source reader also creates a `KuduScanner` for every split without 
explicitly closing it.
   
   Expected behavior:
   
   - Kudu scanners are closed after each split is consumed, including 
exceptional paths.
   - Kudu client executors have fully terminated before the engine releases the 
connector classloader.
   - The split enumerator releases its Kudu client after scan tokens have been 
generated instead of retaining it until job teardown.
   
   ### SeaTunnel Version
   
   Current `dev` branch (`3.0.0-SNAPSHOT`).
   
   ### SeaTunnel Config
   
   ```conf
   env {
     parallelism = 1
     job.mode = "BATCH"
   }
   
   source {
     Kudu {
       kudu_masters = "kudu-master:7051"
       table_name = ".*"
       use_regex = true
     }
   }
   
   sink {
     Assert {
       rules {
         table-names = ["kudu_source_table_1", "kudu_source_table_2"]
       }
     }
   }
   ```
   
   ### Running Command
   
   ```shell
   TEST_IN_PR=true RUN_ALL_CONTAINER=true ./mvnw -pl 
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-kudu-e2e -DskipUT 
-DskipIT=false verify
   ```
   
   ### Error Exception
   
   ```log
   Exception in thread "kudu-nio-3" java.lang.NoClassDefFoundError:
   org/apache/kudu/shaded/io/netty/util/concurrent/DefaultPromise$1
   
   java.lang.NoClassDefFoundError:
   org/apache/kudu/shaded/io/netty/handler/ssl/SslCloseCompletionEvent
   ```
   
   In flaky runs, the following failure can occur in the next Flink container:
   
   ```log
   The heartbeat of JobManager timed out.
   RegistrationTimeoutException: Could not register at the ResourceManager 
within 300000 ms.
   ```
   
   ### Zeta or Flink or Spark Version
   
   Observed with Flink 1.13.6 and Flink 1.15.3 in the connector E2E suite.
   
   ### Java or Scala Version
   
   Observed in both Java 8 and Java 11 E2E jobs.
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's Code of Conduct.
   


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