Repository navigation
Deflake 04819_dynamic_aggregate_function_state_version: validate and retry the Native blob fetch - #116342
Conversation
Under the ParallelReplicas CI configuration the blob-producing SELECT can die from a transient coordinator/replica teardown race (`ATTEMPT_TO_READ_AFTER_EOF` in `receivePartitionMergeTreeReadTaskResponse`, then `UNKNOWN_CODEC` on the initiator). HTTP streaming has already sent a 200 by then, so the exception text lands in the blob file and poisons the next `INSERT ... FORMAT Native` with a confusing `Unknown type code: 0x61 (INCORRECT_DATA)`. Validate the fetched blob and retry a few times, so only the round trips the test actually checks can fail it. Closes: #116341
|
Workflow [PR], commit [5080bdb] Summary: ✅ AI ReviewSummaryThis PR tries to deflake Findings
Final VerdictNot ready: the deflake leaves one remaining unchecked HTTP |
| # and the exception text then lands in the blob — HTTP streaming may have already sent a 200 — poisoning | ||
| # the next `INSERT` with a confusing `INCORRECT_DATA`. Validate the fetched blob and retry a few times, | ||
| # so only the checked round trips can fail the test. | ||
| fetch_native_blob() |
There was a problem hiding this comment.
This helper only hardens the first five SELECT ... FORMAT Native fetches. The later shared-variant round trip still does a raw $CLICKHOUSE_CURL > "$blob" at line 156, and under the ParallelReplicas profile that query goes through the same default parallel-replica read path as the earlier dynamic_qd fetches. That means the same ATTEMPT_TO_READ_AFTER_EOF/UNKNOWN_CODEC response can still be written into 04819_dynamic_shared.native and make shared variant round trip fail with the same misleading INCORRECT_DATA.
Please route the dynamic_qd_shared fetch through the same validation/retry path as well, e.g. by parameterizing fetch_native_blob with the query text instead of closing over the single dynamic_qd query.
There was a problem hiding this comment.
It's still ok for me.
Conflict in `04819_dynamic_aggregate_function_state_version.sh`: master merged #116342, which deflaked the same fetches with a `fetch_native_blob` helper that greps the blob for `DB::Exception` and sleeps between retries. Resolved in favor of this PR's `fetch_blob` (the `curl` exit-code check suggested in issue #116341), removing the now-dead `fetch_native_blob`; this PR also guards the shared-variant fetch that #116342 left raw. Co-Authored-By: Claude Fable 5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Under the
ParallelReplicasCI configuration, the blob-producingSELECT ... FORMAT Nativeover HTTP in04819_dynamic_aggregate_function_state_versionoccasionally dies from a transient coordinator/replica teardown race (ATTEMPT_TO_READ_AFTER_EOFinTCPHandler::receivePartitionMergeTreeReadTaskResponse, thenUNKNOWN_CODECon the initiator). HTTP streaming has already sent a 200 by then, so the exception text lands in the blob file and poisons the nextINSERT ... FORMAT Nativewith a confusingUnknown type code: 0x61 (INCORRECT_DATA)— the failure seen sporadically across unrelated PRs since 2026-08-06.Validate the fetched blob (non-empty, no
DB::Exceptiontext) and retry a few times, so only the round trips the test actually checks can fail it. The root-cause chain was reproduced locally with parallel replicas over a 3-loopback-replica cluster and is documented in the linked issue.Observed on: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96130&sha=d74faf84e6fcb82b2f5ef56ffe8a280124de9a61&name_0=PR (PR #96130)
Closes: #116341
Workflow [PR]
Sync PR [sync-upstream/pr/116342]