happyboy1024 commented on code in PR #5698:
URL: https://github.com/apache/seatunnel/pull/5698#discussion_r1375902069
##########
seatunnel-translation/seatunnel-translation-base/src/main/java/org/apache/seatunnel/translation/source/CoordinatedSource.java:
##########
@@ -165,7 +165,12 @@ public void run(Collector<T> collector) throws Exception {
while (flag.get()) {
try {
reader.pollNext(collector);
-
Thread.sleep(SLEEP_TIME_INTERVAL);
+ if
(collector.isEmptyThisPollNext()) {
+ Thread.sleep(100);
+ } else {
+
collector.resetEmptyThisPollNext();
+ Thread.sleep(0L);
Review Comment:
After a split is processed, sleep can temporarily releases CPU resources to
prevent the checkpoint flow from failing to obtain the lock. It is mentioned in
this issue https://github.com/apache/seatunnel/issues/5694
--
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]