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] Adjust the timing of invoking the enumerator open method #9092

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

Conversation

Hisoka-X
Copy link
Member

@Hisoka-X Hisoka-X commented Mar 31, 2025

Purpose of this pull request

This PR corrects the confusion of enumerator method calling order on different engines.
In Spark/Flink, we invoke open method before registerReader method.
But in Zeta, we invoke registerReader method before open method.
So this PR correct Zeta bahavior to same as Spark/Flink.

Does this PR introduce any user-facing change?

no

How was this patch tested?

add new test.

Check list

@github-actions github-actions bot added the Zeta label Mar 31, 2025
@hailin0 hailin0 requested a review from Copilot March 31, 2025 13:29
Copy link

@Copilot 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 adjusts when the enumerator's open method is invoked to ensure it is called at the appropriate time during task initialization.

  • Move enumerator.open() invocation from the stateProcess method to the init method
  • Remove duplicate enumerator.open() call in the READY_START case, ensuring the lifecycle event is still sent
Comments suppressed due to low confidence (1)

seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:119

  • The new placement of enumerator.open() in the init method should be accompanied by additional tests to ensure it integrates correctly with the enumerator's lifecycle.
enumerator.open();

@Hisoka-X Hisoka-X marked this pull request as ready for review April 1, 2025 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant