[fix](regression) Wait for show config output before parsing#65486
Draft
shuke987 wants to merge 1 commit into
Draft
[fix](regression) Wait for show config output before parsing#65486shuke987 wants to merge 1 commit into
shuke987 wants to merge 1 commit into
Conversation
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: The regression case started asynchronous stdout and stderr consumers for the show-config curl process, but only waited for the process itself before parsing stdout. The stdout consumer could still be copying the response, causing intermittent empty JSON input. Wait for both output consumers to finish before reading the exit value and parsing the response.
### Release note
None
### Check List (For Author)
- Test: Manual test
- Parsed the changed case with Groovy 4.0.19 and verified a 51,904-byte process stdout payload is fully captured.
- Behavior changed: No
- Does this need documentation: No
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 PR 65486 against the Doris code-review checkpoints. I did not find a substantiated issue that warrants an inline review comment.
Key conclusions:
- Goal and scope: The PR targets an intermittent regression-test race where
consumeProcessOutputreader threads could still be filling stdout afterProcess.waitFor()returned. Replacing it withwaitForProcessOutputbefore parsing directly addresses that in the changed test. - Focus and size: The patch is small and limited to the
/api/show_configcapture path intest_mow_table_with_format_v2. - Concurrency/lifecycle: No Doris runtime concurrency or lifecycle code is changed. The relevant concurrency is local process-output reader thread synchronization, and the new pattern waits for the output consumers before reading
exitValue()and parsing. - Compatibility/config/session: No product config, session propagation, FE/BE protocol, persisted data, or storage format changes.
- Optimizer/data correctness: SQL text, expected product assertions,
MATCHquery shape, and compaction checks are unchanged. - Tests and validation: I could not run the regression suite in this checkout because
.worktree_initializedandthirdparty/installedare absent andgroovyis not installed. Static review used GitHub PR metadata and local source inspection. Existing Doris regression tests use the samewaitForProcessOutput(...); exitValue()pattern. - User focus: No additional user-provided focus was supplied.
Subagent conclusions:
optimizer-rewrite: no optimizer/rewrite candidate; the patch does not affect SQL text, plan shape, joins, aggregates, or Nereids rules.tests-session-config: no tests/session/config candidate; expected outputs and config/session propagation are unchanged.- Convergence: round 1 ended with all live subagents reporting
NO_NEW_VALUABLE_FINDINGSfor the final ledger and empty inline-comment set.
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: N/A
Related PR: N/A
Problem Summary:
test_mow_table_with_format_v2usedconsumeProcessOutputto start asynchronous stdout and stderr reader threads, then calledProcess.waitFor()and immediately parsed the stdout buffer.waitFor()only waits for the curl process and does not join the reader threads, so the case could intermittently parse an empty buffer even though/api/show_configreturned a complete response.The same failure signature appeared in P0 build 992109 and Cloud P0 build 983996: curl exited with code 0 and reported receiving the response, while the captured stdout was still empty at parse time.
This change uses
waitForProcessOutputto wait for both reader threads before reading the exit value and parsing the JSON response. The product assertions and test intent are unchanged.Release note
None
Check List (For Author)
Test
waitForProcessOutputcaptures a 51,904-byte stdout payload before returning.git diff --checkpassed.Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)