Repository navigation
Make test 03988_cached_read_big_at fast - #125010
Conversation
The test read whole `Title`, `URL` and `SearchPhrase` columns of `test.hits_parquet` from the public AWS S3 bucket, which takes 344 s median (up to 466 s) in `Stateless tests (arm_asan_ubsan, azure, sequential)` and contributes to the job hitting its 9000 s timeout. Instead, write a small (about 7 MB) Parquet file with 10 row groups to MinIO and read it through the `cache_for_readbigat` filesystem cache with a small `remote_read_min_bytes_for_seek`, so that the Parquet reader issues many small concurrent `readBigAt` calls whose ranges share 1 MiB file segments. This is the scenario of the bug: one call leaves a segment partially downloaded and another one continues downloading it with the same remote reader. The new test fails 3 of 3 runs with the exact exception from the issue (`CANNOT_SEEK_THROUGH_FILE` from `ReadBufferFromS3::seek` in `prepareReadFromFileSegmentState` called by `readBigAt`) on the CI master build from just before the fix (8c014eb), and passes on the build with the fix (ab8ca2b) and on current master, taking about 1.2 s. The test no longer needs the `stateful`, `long` and `no-parallel` tags: the file has a unique name per database, so its cache key is fresh and the cache does not need to be cleared. Related: #97325 Related: #97890 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [38f7a58] Summary: ✅ AI ReviewSummaryThis PR rewrites Final VerdictStatus: ✅ Approve |
…e parallel replicas Use a per-run unique id (with `generateUUIDv4`) for the file name and the query ids, so that a rerun in the same database starts with a cold cache and does not see `query_log` rows of the previous run. Disable parallel replicas for the reading queries: in the `ParallelReplicas` job the `s3` table function was executed on other replicas, so the profile events of the initial query were zero. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125010&sha=57ee7e135a7e34d27ce4c65d0a05d3a7e8b1117a&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29 PR: #125010 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 The only failure, |
|
🕵 The only failure, |
|
🕵 The only CI failure, |
After the left side of the join became `numbers(10)`, `ANY LEFT JOIN ... LIMIT 1` without `ORDER BY` may return any of its rows. With parallel replicas it returned `5`. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125010&sha=7bb4fa863a77f8bfe9065f40349fdab1db9bea39&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29 Related: ClickHouse#125010 Co-Authored-By: Claude Opus 5.5 <[email protected]>
`MD5` throws `SUPPORT_IS_DISABLED` in OpenSSL FIPS builds. ClickHouse#125010 dropped the `stateful`/`long` tags and introduced the `MD5` call, so the test now runs and fails there. `sipHash128` also returns `FixedString(16)`, so `substring(hex(...), 1, 16)` keeps 16-char values and the same Parquet layout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test
03988_cached_read_big_atread wholeTitle,URLandSearchPhrasecolumns oftest.hits_parquetfrom the public AWS S3 bucket. It took 344 s median (up to 466 s) inStateless tests (arm_asan_ubsan, azure, sequential), which hits its 9000 s timeout: 7 of 22 master runs timed out on 2026-10-09.Now the test writes a small (about 7 MB) Parquet file with 10 row groups to MinIO and reads it through the
cache_for_readbigatfilesystem cache with a smallremote_read_min_bytes_for_seek. The Parquet reader then issues many small concurrentreadBigAtcalls whose ranges share 1 MiB file segments. That is the scenario of the bug: one call leaves a segment partially downloaded, and another call continues downloading it with the same remote reader. The result is checked against checksums computed from the source data, andquery_logconfirms that the reads went through the cache.I checked it against CI master builds:
CANNOT_SEEK_THROUGH_FILEraised inReadBufferFromS3::seek, called fromprepareReadFromFileSegmentState, called fromreadBigAt.The
stateful,longandno-paralleltags are removed. Each database writes its own file, so the cache key (path + etag) is new and the cache does not need clearing.Related: #97325
Related: #97890
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125010]
Version info
26.10.1.2208-master(included in26.10and later)