[Log](pyudf) Add progress logs for python process pool init#62974
Open
linrrzqqq wants to merge 2 commits intoapache:masterfrom
Open
[Log](pyudf) Add progress logs for python process pool init#62974linrrzqqq wants to merge 2 commits intoapache:masterfrom
linrrzqqq wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Collaborator
Author
|
run buildall |
Collaborator
Author
|
/review |
Contributor
There was a problem hiding this comment.
Reviewed the PR diff from GitHub. I did not find a blocking issue.
Critical checkpoint conclusions:
- Goal and tests: The change adds periodic elapsed-time/progress logging for Python UDF process pool initialization and reduces regression pipeline Python process counts. The code accomplishes the stated observability goal. No new test is required for the log-only path, and existing Python UDF regression coverage should still exercise pool initialization.
- Scope: The code change is small and focused in
PythonServerManager::ensure_pool_initialized; config changes are limited to regression pipeline BE configs. - Concurrency: Pool initialization still runs under
_pools_mutexas before. The newwait_forloop does not introduce new shared mutable state;success_count/failure_countremain local to the initializing thread, and future ownership is unchanged. - Lifecycle/static initialization: No new static/global object or non-intuitive lifecycle dependency was added. The health-check thread lifecycle is unchanged.
- Configuration: No new config item was added. Existing regression config values are reduced from 64 to 16 only.
- Compatibility/storage/transactions: No protocol, storage format, transaction, visible-version, or persistence path is changed.
- Parallel code paths: UDF/UDAF/UDTF clients all share this same
PythonServerManager::get_clientpath, so the logging applies consistently. - Special conditions/error handling: Existing
Statuspropagation remains checked. The new wait loop only observes future readiness before the existingget(). - Test result changes: No result-file updates are part of the actual GitHub PR diff.
- Observability: The added logs include Python version, waiting slot, success/failure counts, and elapsed time, which should help diagnose slow pool initialization without changing normal success behavior.
- Performance: In normal initialization the added
wait_forcall should be negligible; in slow/hung cases it logs at a 20s interval, which is reasonable. - User focus: No additional user-provided review focus was specified.
Residual note: the progress log is sequential by slot, so if an earlier slot is slow while later futures have already completed, success may not reflect those later completed futures until the earlier slot is collected. This is acceptable for diagnostic progress logging and not a correctness issue.
Collaborator
Author
|
run buildall |
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 problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Improve observability for rare Python UDF process pool initialization stalls.
Previously, when initialization was blocked or unusually slow, logs only showed the start of pool creation, making it difficult to tell whether BE was still waiting on process startup or where time was being spent. This adds lightweight progress and elapsed-time logs to help diagnose initialization hangs without increasing normal-case log volume.
And reduce the
max_python_process_numto 16 in regression test, we don't need so many processes for testing.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)