Skip to content

Conversation

@zhangshenghang
Copy link
Member

@zhangshenghang zhangshenghang commented Dec 20, 2024

Purpose of this pull request

modify after

Verify Source Kafka

image #### Verify Source MySQL-CDC image

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@github-actions github-actions bot added the flink label Dec 20, 2024
Comment on lines 65 to 71
private final ScheduledExecutorService scheduledExecutor =
Executors.newSingleThreadScheduledExecutor(
r -> {
Thread thread = new Thread(r, "source-reader-scheduler");
thread.setDaemon(true);
return thread;
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you share some details about why we should introduce the ScheduledExecutorService in reader?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there is no data, we should return InputStatus.NOTHIND_AVAILABLE When returning the NOTHIND_AVAILABLE state, the isAvailable() method will be executed. IsAvailable returns a future, where the longer the blocking time, the lower the Busy value.

@zhangshenghang
Copy link
Member Author

@Hisoka-X @hailin0 This is a temporary solution。
a long-term solution:

Carl-Zhou-CN
Carl-Zhou-CN previously approved these changes Dec 21, 2024
Copy link
Member

@Carl-Zhou-CN Carl-Zhou-CN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

hailin0
hailin0 previously approved these changes Dec 23, 2024
Copy link
Member

@hailin0 hailin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@TyrantLucifer TyrantLucifer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, could you please offer some test results about this optimize?

@Hisoka-X Hisoka-X changed the title [fix][flink]Resolve Source Busy consistently at 100% [Fix][Flink] Resolve streaming source high CPU usage Dec 23, 2024
Hisoka-X
Hisoka-X previously approved these changes Dec 23, 2024
@TyrantLucifer TyrantLucifer merged commit eae32bf into apache:dev Dec 24, 2024
7 checks passed
@zhangshenghang zhangshenghang deleted the fix-flink branch December 24, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [Flink] 使用flink引擎执行Seatunnel cdc任务时,source端一直处于busy状态,这个是极不正常的

5 participants