[Chore][Improvement][Worker] Centralize varPool sync after physical task execution#18071
Open
Mrhs121 wants to merge 2 commits intoapache:devfrom
Open
[Chore][Improvement][Worker] Centralize varPool sync after physical task execution#18071Mrhs121 wants to merge 2 commits intoapache:devfrom
Mrhs121 wants to merge 2 commits intoapache:devfrom
Conversation
ruanwenjun
reviewed
Mar 17, 2026
| taskExecutorEventBus.publish(TaskExecutorRuntimeContextChangedLifecycleEvent.of(taskExecutor)); | ||
| } | ||
| }); | ||
| this.getTaskExecutionContext().setVarPool(this.physicalTask.getParameters().getVarPool()); |
Member
There was a problem hiding this comment.
I would prefer to add this kind of lifecycle method at AbstractTask(maybe names ITaskPlugin in the future).
I plan to refactor some of the TaskPlugin interfaces in version 3.5.0.
|
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.



Was this PR generated or assisted by AI?
Purpose of the pull request
We have already fixed similar varPool missing issues(such as: #17456, #18044, #17968, #18042) several times in different task implementations. Continuing to add setVarPool(...) case by case in each task makes it easy to miss again later.
After physicalTask.handle(...) completes, sync the task parameter varPool back to TaskExecutionContext in one place. This avoids repeating setVarPool(...) in each task implementation and prevents similar missing-varPool issues from being reintroduced in new plugins.
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
Pull Request Notice
Pull Request Notice
If your pull request contains incompatible change, you should also add it to
docs/docs/en/guide/upgrade/incompatible.md