Repository navigation
Conversation
Functional-test env setup shows a multi-minute blank gap in job.log right after "Restarting clickminio (timeout 60s)", which reads like a hung minio restart. It is not: the clean `mc admin service restart --wait` succeeds within its bound (no fallback/warning lines in the log), and the time is `prepare_stateful_data` loading the hits/visits datasets - lazily reading `datasets.hits_v1`/`visits_v1` from the web disk (real AWS S3, us-east-1) and writing `test.hits`/`test.hits_s3` into the local minio. Its output goes to a log file and stdout is block-buffered under `Result.from_commands_run`'s `Tee`, so nothing flushes for minutes. `prepare_stateful_data` runs on every functional-test job (`has_stateful_tests` is always True in CI). But a `--no-stateful` job (the `s3 storage` and `DatabaseReplicated` variants) filters out every `stateful`-tagged test, and those are the *only* consumers of `test.hits`/`test.visits`/`test.hits_s3`/ `test.hits_parquet`/`datasets` (verified: 0 non-stateful consumers across `tests/queries/0_stateless`). The TPC-H/TPC-DS correctness tests (`04033_tpc_ds_*`, `04040_tpc_h_*`) are NOT tagged `stateful`, so they still run and their databases must stay. So gate the hits/visits/datasets section of the prep script behind a `NO_STATEFUL` guard and always create `tpch`/`tpcds`. `functional_tests.py` derives the flag from the runner options (`--no-stateful in runner_options`), not from a specific storage option, so any `--no-stateful` job benefits. Also make the step attributable: print a flushed start/end banner with elapsed time so the load stops masquerading as a stuck clickminio restart in job.log. Log with the gap: https://s3.amazonaws.com/clickhouse-test-reports/PRs/106250/4364e2f746b647512274e6e0185b788c6066e8dc/stateless_tests_amd_tsan_s3_storage_parallel_1_2/job.log Related: #106250
|
Workflow [PR], commit [6658cc7] Summary: ✅ AI ReviewSummaryThis PR skips the unused Findings
Final Verdict
|
| # visits_v1 from the web disk, real AWS S3), so signal prepare_stateful_data | ||
| # to skip it. Keyed off the actual runner flag, not a specific storage | ||
| # option, so any --no-stateful job wins. | ||
| is_no_stateful = "--no-stateful" in runner_options |
There was a problem hiding this comment.
The new NO_STATEFUL path fixes the CI jobs, but it does not carry the same contract through the local --test shortcut. In local runs we still set has_stateful_tests = False unless a selected file contains the word stateful ([functional_tests.py:510-536]), and every 04033_tpc_ds_* / 04040_tpc_h_* test intentionally lacks that tag. So prepare_stateful_data is skipped entirely for a local run like python3 ci/jobs/functional_tests.py --options 's3 storage' --test 04033_tpc_ds_q01 ..., and neither tpcds nor tpch gets created even though this PR now treats them as required in --no-stateful mode. Please teach the local heuristic to preserve prep for those consumers as well, or replace it with a more explicit needs_prepared_data check.
|
Combined into #109745 (its commits are merged into that branch); closing in favor of the combined PR. |
… --no-stateful The `s3 storage` stateless jobs pass `--no-stateful`, so `clickhouse-test` skips every `stateful`-tagged test, the only readers of `datasets.*`, `test.hits`, `test.visits`, `test.hits_s3` and `test.hits_parquet`. Their preparation still copied the datasets into S3-backed tables twice, which took 367-763 s per `amd_tsan, s3 storage, parallel` shard and 460-748 s per `amd_llvm_coverage, *, s3 storage` job on master. `prepare_stateful_data` now gets the runner's `--no-stateful` decision and skips those tables when it is set. `tpch`/`tpcds` are still loaded because the TPC-H/TPC-DS tests are not tagged `stateful`. The flag is taken from the runner options rather than from `s3 storage`, so a job that runs stateful tests always gets its data. Jobs without `--no-stateful` run the same statements; the three `datasets` statements just move after the independent TPC loaders. The same guard was proposed in ClickHouse#109735 / ClickHouse#109745 by @ fm4v. Requested in ClickHouse#119542 (comment) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Description / motivation
Functional-test env setup shows a multi-minute blank gap in
job.logright afterRestarting clickminio (timeout 60s), which reads like a hung minio restart:It is not the restart. The clean
mc admin service restart --waitsucceeds within its bound (there are no fallback/warning lines anywhere in the log). The ~9 minutes isprepare_stateful_dataloading the hits/visits datasets — lazily readingdatasets.hits_v1/visits_v1from the web disk (real AWS S3,us-east-1) and writingtest.hits/test.hits_s3into the local minio (the writes are local, not real S3). The step's output goes to a log file and stdout is block-buffered underResult.from_commands_run'sTee, so nothing flushes for minutes and the gap looks like a stuck restart.prepare_stateful_dataruns on every functional-test job (has_stateful_testsis alwaysTruein CI). But a--no-statefuljob (thes3 storageandDatabaseReplicatedvariants) filters out everystateful-tagged test, and those are the only consumers oftest.hits/test.visits/test.hits_s3/test.hits_parquet/datasets(verified: 0 non-stateful consumers acrosstests/queries/0_stateless). The TPC-H / TPC-DS correctness tests (04033_tpc_ds_*,04040_tpc_h_*) are not taggedstateful, so they still run and theirtpch/tpcdsdatabases must stay.This PR:
NO_STATEFULguard and always createstpch/tpcds.functional_tests.pyderives the flag from the runner options (--no-stateful in runner_options), not a specific storage option, so any--no-statefuljob benefits.clickminiorestart injob.log.Behavior is unchanged for regular
parallel/sequentialstateless jobs (they runstatefultests, so they still prepare everything). Verified the generated script withbash -nand a stubbed-client run in both modes:NO_STATEFUL=1creates onlytest+tpcds+tpch; the default path is unchanged.Follow-up (not in this PR): bake
hits_v1/visits_v1into the stateless-test image as a local plain object-storage disk (object_storage_type=local_blob_storage,metadata_type=plain_rewritable,table_disk=1) so reads are local-speed instead of lazy web-disk reads. That needs an offline-generated, hosted dataset image + build validation of the disk DDL, so it is tracked separately.CI report (source of the log):
https://s3.amazonaws.com/clickhouse-test-reports/PRs/106250/4364e2f746b647512274e6e0185b788c6066e8dc/stateless_tests_amd_tsan_s3_storage_parallel_1_2/job.log
Related: #106250
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes