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][Zeta] Introduce SeaTunnel CompletableFuture to prevent ForkJoinPool thread shortage #8445

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

Hisoka-X
Copy link
Member

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

Purpose of this pull request

In Zeta, 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
@Hisoka-X Hisoka-X force-pushed the new-completablefuture branch from 578b3ed to 501a423 Compare January 6, 2025 12:55
@github-actions github-actions bot removed the CI&CD label Jan 6, 2025
@Hisoka-X Hisoka-X force-pushed the new-completablefuture branch from 501a423 to 698a4af Compare January 7, 2025 03:28
@github-actions github-actions bot removed core SeaTunnel core module connectors-v2 e2e api labels Jan 7, 2025
@github-actions github-actions bot added the e2e label Jan 7, 2025
@Hisoka-X Hisoka-X changed the title [Fix][Core] Introduce SeaTunnel CompletableFuture to prevent ForkJoinPool thread shortage [Fix][Zeta] Introduce SeaTunnel CompletableFuture to prevent ForkJoinPool thread shortage Jan 7, 2025
Copy link
Contributor

@dailai dailai left a comment

Choose a reason for hiding this comment

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

LGTM

@wuchunfu wuchunfu merged commit b8b8ca1 into apache:dev Jan 8, 2025
6 checks passed
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.

4 participants