Skip to content

Conversation

@sohurdc
Copy link
Contributor

@sohurdc sohurdc commented Jun 11, 2025

Purpose of this pull request

parallelStream may broken the binding of task and classloader, change to stream to avoid the problem.

Does this PR introduce any user-facing change?

no

How was this patch tested?

no

Check list

@github-actions github-actions bot added the Zeta label Jun 11, 2025
@sohurdc sohurdc changed the title change parallelStream to stream 【fix】【engine】change parallelStream to stream Jun 11, 2025
@sohurdc sohurdc changed the title 【fix】【engine】change parallelStream to stream [fix][engine] change parallelStream to stream Jun 11, 2025
@nielifeng nielifeng requested a review from Copilot June 12, 2025 03:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes the use of parallelStream in favor of a sequential stream to prevent task and classloader binding issues.

  • Replaces parallelStream() with stream() in the SeaTunnelTask class.
  • Aims to resolve binding issues noted in the PR description.
Comments suppressed due to low confidence (1)

seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SeaTunnelTask.java:301

  • Switching from parallelStream to stream could impact performance when processing large collections. It is recommended to validate that the sequential processing meets the performance requirements for this task.
MDCTracer.tracing(allCycles.stream())

@Hisoka-X
Copy link
Member

Hisoka-X commented Jun 12, 2025

Thanks @sohurdc for raise this pr.

parallelStream may broken the binding of task and classloader

Could you share more information about why it could happend?

I got it. The classloader corresponding to the default thread pool used by parallelStream is not what we need.

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

LGTM.

@Hisoka-X Hisoka-X changed the title [fix][engine] change parallelStream to stream [Fix][Zeta] change parallelStream to stream in SeaTunnelTask to avoid classloader mismatch Jun 12, 2025
@hailin0 hailin0 merged commit 8f735be into apache:dev Jun 13, 2025
5 of 6 checks passed
chncaesar pushed a commit to chncaesar/seatunnel that referenced this pull request Jun 30, 2025
dybyte pushed a commit to dybyte/seatunnel that referenced this pull request Jul 23, 2025
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.

3 participants