[FLINK-40628][python] Avoid gateway launch during embedded TTL initialization - #29155
Open
bowenli86 wants to merge 5 commits into
Open
[FLINK-40628][python] Avoid gateway launch during embedded TTL initialization#29155bowenli86 wants to merge 5 commits into
bowenli86 wants to merge 5 commits into
Conversation
…lization Keep the default RocksDB cleanup duration lazy and materialize it only when requested through the public accessor. Generated-by: Codex (GPT-6)
Generated-by: Codex (GPT-6)
Collaborator
bowenli86
marked this pull request as ready for review
September 10, 2026 22:41
…t after Variant type change The Variant interface is Serializable without an explicit serialVersionUID, so its auto-generated UID changes whenever its declared method set changes. FLINK-40515 added a UUID accessor to the interface, which shifted the UID and invalidated the checked-in calc-variant restore savepoint. CalcRestoreTest then failed to restore it with InvalidClassException. Regenerate the calc-variant savepoint against the current Variant. The compiled plan is unchanged. Generated-by: Claude Code (claude-opus-4-8) (cherry picked from commit 7ee18e0)
Member
Author
|
@flinkbot run azure |
…ixture Remove the separately tracked FLINK-40631 fixture correction from this PR while preserving the existing TTL changes and commit history. Generated-by: Codex (GPT-6)
…or CI Restore the upstream-generated fixture from commit 7ee18e0 (apache#29156) so the unrelated CalcRestoreTest also passes. This restores the source tree tested successfully by Azure build 78961 while preserving the existing PR commits. Generated-by: Codex (GPT-6)
Member
Author
|
@flinkbot run azure |
dianfu
reviewed
Sep 11, 2026
Contributor
There was a problem hiding this comment.
@bowenli86 Good catch! Thanks for this fix.
Do you think it makes sense to add some centralized guard (raise some meaningful error messages to tell users to use pemja.findClass if they want to call Java from Python in thread mode) for embedded workers. Users can accidentally call Py4J and potentially fall through to launch_gateway().
Besides, I saw that we have included changes of FLINK-40631 in this PR. Are there any special reasons to do so?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Fix FLINK-40628. Initializing TTL-enabled state in a Python thread-mode operator can request a Py4J gateway while constructing the default RocksDB cleanup strategy. Starting that subprocess from a multithreaded TaskManager can leave the task stuck in INITIALIZING.
Brief change log
Durationuntil the public accessor is called. The embedded converter continues to use Java's existing default.calc-variantsavepoint refresh from FLINK-40631 / PR #29156, with its upstream attribution, so the unrelated master table test can deserialize the currentVarianttype.Verifying this change
2932b88ed1ababb9abb6dd9bfd37a54ae00b90c1passed all 13 jobs: compilation, Python, table, core, connectors, misc, tests, licensing, documentation, and all four E2E groups.test_state_ttl_config.pyand the checked-inEmbeddedDataStreamStreamTests.test_state_ttl_without_gateway. The previously failingCalcRestoreTestalso passed with zero failures or errors after the fixture refresh. No tests are disabled or skipped by this change.Does this pull request potentially affect one of the following parts:
Documentation
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-6)