[KYUUBI #7644][FLINK] Prevent concurrent access to bootstrap job IDs - #7646
Open
wForget wants to merge 1 commit into
Open
[KYUUBI #7644][FLINK] Prevent concurrent access to bootstrap job IDs#7646wForget wants to merge 1 commit into
wForget wants to merge 1 commit into
Conversation
pan3793
reviewed
Aug 21, 2026
|
|
||
| private static Collection<JobID> bootstrapJobIds; | ||
|
|
||
| private static boolean bootstrapJobIdsClaimed; |
pan3793
reviewed
Aug 21, 2026
| val claimMethod = classOf[EmbeddedExecutorFactory] | ||
| .getDeclaredMethod("claimJobIdsForExecutor") | ||
| claimMethod.setAccessible(true) | ||
| claimMethod.invoke(null).asInstanceOf[Collection[JobID]] |
Member
There was a problem hiding this comment.
seems can be simplified by org.scalatest.PrivateMethodTester
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.
Why are the changes needed?
Closes #7644.
In Flink YARN application mode, Kyuubi retains Flink's original application job ID list for the bootstrap job and uses a thread-safe copy for subsequent jobs. However, the list was selected based on whether the original list was empty.
Because the engine frontend could become available before bootstrap completed, the bootstrap query and a client query could both receive the original non-thread-safe
ArrayList. Concurrent additions could then cause anArrayIndexOutOfBoundsException.This patch atomically reserves the original list for one bootstrap executor and completes bootstrap before exposing the engine frontend.
How was this patch tested?
Added
EmbeddedExecutorFactorySuiteto verify that the original Flink application job ID list is returned to only one executor and subsequent executors use the thread-safe collection.Was this patch assisted by generative AI tooling?
Assisted-by: Codex with GPT-5