Repository navigation
Do not log a killed query's unused prefetch failure as an error in AsynchronousBoundedReadBuffer - #129275
Do not log a killed query's unused prefetch failure as an error in AsynchronousBoundedReadBuffer#129275groeneai wants to merge 1 commit into
Conversation
…ynchronousBoundedReadBuffer When a query reading object storage with prefetch is killed (or its TCP client cancels it), an in-flight prefetch can fail with the query's own stored cancellation: a failed S3 GET attempt makes `ReadBufferFromS3::processException` rethrow it via `CurrentThread::checkIfNotCancelled`. The future of that prefetch is never consumed, so `~AsynchronousBoundedReadBuffer` drains it in `finalize` and logged it at error level; with `send_logs_level` the line also reached the client, which failed `03312_squashing_with_low_card_mem_usage` with `having stderror` in the ParallelReplicas s3 jobs, where the initiator cancels its replicas once `LIMIT` is satisfied. Log it at debug level when the current thread's query is cancelled, as `AsyncInsertQueueTransform` already does for the same case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
cc @CheSema @antonio2368, could you review this and add the |
|
Workflow [PR], commit [4acda13] AI ReviewSummary
Final Verdict✅ Approve. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 8 s compile time in total, 7 of them have a recent master baseline. |
|
Moved: the commit is on my fork branch for #129311, https://github.com/groeneai/ClickHouse/commits/reland-127149-ci-fixes (groeneai@213a5d0, same diff as this PR). Closing this one. |
Related: #127149
Related: #113939
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
Since #127149, a TCP client's
Cancelkills the query in the process list. Under parallel replicas the initiator sendsCancelas soon asLIMITis satisfied, so this is routine in theParallelReplicas, s3 storagejobs. An S3 GET of an in-flight prefetch that fails after the kill makesReadBufferFromS3::processExceptionrethrow the query's stored cancellation (CurrentThread::checkIfNotCancelled, #113939). Nothing consumes that prefetch, so~AsynchronousBoundedReadBufferdrains it infinalizeand logged it atError. Withsend_logs_levelthe line reaches the client, and03312_squashing_with_low_card_mem_usagefailed withhaving stderroron two unrelated PRs (#128995, #128413):The destructor now logs at
debugwhen the current thread's query is killed, asAsyncInsertQueueTransformalready does since #127149. A failed unused prefetch of a live query is still logged atError.Not for changelog: #127149 and #113939 are only in master, not in 26.10.
Validation (debug build, MergeTree on an s3 disk with cache, a prefetching read): while it runs, I
SIGSTOPa private MinIO, thenSIGINTthe client (the CI path, code 735) or runKILL QUERY(394), thenSIGCONT. On master every valid trial logs such<Error>lines: 10/10 withSIGINT(2 to 82 lines), 5/5 withKILL QUERY, 5/5 with parallel replicas. With the fix, all 20 trials have no<Error>line from this logger, and the same exception appears atdebugin each. No new test: the window needs a stalled object store, which a stateless test cannot produce.Workflow [PR]
Sync PR [sync-upstream/pr/129275]