Repository navigation
Stress test: ignore benign filesystem-cache background-download No such key - #108489
Conversation
…ch key The filesystem cache background-download worker (CacheMetadata, src/Interpreters/FileCache/Metadata.cpp) continues prefetching a partially-downloaded file segment. Under stress the underlying S3 object can be concurrently removed (DROP, mutation, part removal), so the GET returns Code: 499 NoSuchKey. The worker catches this, marks the segment download failed and logs "Error during background download"; the data is simply re-read from the source later, so it is benign. The stress critical-error scan greps for "Code: 499 ... specified key does not exist" and already excludes the foreground form of this event (ReadBufferFromS3, AsynchronousBoundedReadBuffer, "ReadBuffer is canceled by the exception"), but not the background-download form, so it was flagged as a lost s3 key. Add "Error during background download" to the grep -v allowlist. The token is unique to the CacheMetadata background-download log line, so a genuinely lost key reported from any other path is still flagged.
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-0:20260625-132900 |
|
cc @antonio2368 — could you review this? It extends the stress critical-error |
|
Workflow [PR], commit [0cdd9b7] Summary: ❌
AI ReviewSummary
Missing context / blind spots
Final Verdict
|
alexey-milovidov
left a comment
There was a problem hiding this comment.
Sounds good.
I expect it happens when the filesystem cache is used for ordinary files on S3 (the s3 table function or engine, rather than MergeTree tables).
94a3653
…No such key The "Lost s3 keys" / "S3_ERROR No such key thrown" checks of the functional tests jobs report the filesystem cache background download worker error as a lost object. The worker (CacheMetadata) keeps prefetching a partially downloaded file segment whose remote object can be concurrently removed (DROP, mutation, part removal), so the GET returns Code: 499 NoSuchKey, the download is marked as failed and the data is re-read from the source later - nothing is lost. tests/docker_scripts/stress_tests.lib already ignores this line (ClickHouse#108489), the functional tests checks did not, so `Stateless tests (*, s3 storage, *)` failed with all tests green. Both checks run the same scan, so the ignore list is built once. Also removed an accidentally duplicated "Lost forever for SharedMergeTree" check.
…nore-cachemetadata-bg-download-nosuchkey Stress test: ignore benign filesystem-cache background-download No such key
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
The stress critical-error scan flags benign filesystem-cache background-download
No such keyerrors as lost s3 keys.The filesystem cache background-download worker (
CacheMetadata,src/Interpreters/FileCache/Metadata.cpp) continues prefetching a partially-downloaded file segment. Under stress the underlying S3 object can be concurrently removed (DROP, mutation, part removal), so the GET returnsCode: 499NoSuchKey. The worker catches this, marks the segment download failed and logsError during background download(no rethrow); the data is simply re-read from the source later, so it is benign.tests/docker_scripts/stress_tests.libgreps forCode: 499 ... The specified key does not existand already excludes the foreground form of this event (ReadBufferFromS3,AsynchronousBoundedReadBuffer,ReadBuffer is canceled by the exception), but not the background-download form, so it was reported asS3_ERROR No such key thrown.This adds
Error during background downloadto thegrep -vallowlist, following the precedent of the existing exclusions. The token is unique to theCacheMetadatabackground-download log line (Metadata.cpp:824), so a genuinely lost key reported from any other path is still flagged.Chronic trunk failure: ~10 distinct unrelated PRs + 1 master hit over 30 days, ~1 occurrence each.
Example CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108441&sha=cdabef4635c981dd60507f49d1307f9f7dc4d62a&name_0=PR&name_1=Stress%20test%20%28arm_release%29
Server log line:
Version info
26.7.1.207(included in26.7and later)