Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix][Core] Introduce SeaTunnel CompletableFuture to prevent ForkJoinPool thread shortage #8445

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

Hisoka-X
Copy link
Member

@Hisoka-X Hisoka-X commented Jan 3, 2025

Purpose of this pull request

In Zeta and Connector, we extensively use Java's CompletableFuture object, and there are cases where CompletableFuture tasks are nested. The default ForkJoinPool thread pool is insufficient under heavy load. To address this, we introduced our own CompletableFuture in Zeta, leveraging a cached thread pool for task execution. Additionally, we modified Hazelcast's internal InvocationFuture to use the same thread pool.

Does this PR introduce any user-facing change?

no

How was this patch tested?

add new test.

Check list

@Override
public Thread newThread(Runnable r) {
return new Thread(
r, "CompletableFuture-Thread-" + seq.getAndIncrement());
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
r, "CompletableFuture-Thread-" + seq.getAndIncrement());
r, "SeaTunnel-CompletableFuture-Thread-" + seq.getAndIncrement());

@github-actions github-actions bot added the format label Jan 6, 2025
@hailin0 hailin0 added this to the 2.3.9 milestone Jan 6, 2025
@Hisoka-X Hisoka-X force-pushed the new-completablefuture branch from 76eb866 to 1f53c00 Compare January 6, 2025 11:14
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.

2 participants