Repository navigation
More random disruptions in the stress test - #129515
Conversation
|
Workflow [PR], commit [3ddd251] Summary: ✅ AI ReviewSummaryAdds cache drops, dictionary/view operations, replica restarts, additional background pauses, and fault injection to the stress workload. Request changes: failed replica recovery can still silently remove tables from the workload. Reviewed commit Missing context / blind spots
Findings
Tests
Final Verdict |
|
@PedroTadim when a new branch turns out to be too noisy or hides a real failure behind constant Keeper session loss, the only remedy today is to disable the entire disruptor or edit the script. A --disruptions=kill_query,drop_cache,... option, or at least a module-level tuple that the job can override through an environment variable, would let someone bisect which disruption caused a flaky report without a code change. The help text of --no-random-disruptor also still says "query/client/mutation kills, merge pauses" and should list the new categories. |
|
🕵️ @rahulmalik87 Every action the disruptor takes is already logged, with a timestamp, in the stress job's log: |
|
The CI failure is unrelated and already fixed. One more merge with master |
Extend the stress test's random disruptor beyond killing queries, clients and mutations and pausing background operations: drop a random cache, run a one-shot server statement (`RECONNECT ZOOKEEPER`, `RESTART REPLICAS`, `UNLOAD DICTIONARIES`, `RELOAD FUNCTIONS`/`RELOAD USERS`, `FLUSH ASYNC INSERT QUEUE`, `JEMALLOC PURGE`, `REFRESH ALL BACKGROUND`), reload a random dictionary, refresh or cancel a random refreshable view, and restart a random replica - re-attaching any table a failed `SYSTEM RESTART REPLICA` leaves detached (and leaving it to `prepare_for_hung_check` once shutting down). In `stress_runner.sh`, randomly inject `S3Queue` Keeper faults (via the default profile, which the global context reads at startup) and `ReplicatedMergeTree` part-commit Keeper faults, writing the randomized config files with `echo ... | sudo tee` so the redirect runs as root. Co-Authored-By: Claude Opus 4.8 <[email protected]>
3a5a13d to
36eedac
Compare
|
One more CI run, then merging into master |
The random disruptor's `SYSTEM RESTART REPLICA <table>` and `SYSTEM RESTART REPLICAS` can fail in `doRestartReplica` after the table is detached, for example with `UNKNOWN_AGGREGATE_FUNCTION` when re-creating a table whose columns need a setting the disruptor's client does not enable, or with `TIMEOUT_EXCEEDED` in `waitDetachedTableNotInUse`. That throw is outside the `try` that adjusts the `DatabaseReplicated` metadata digest, so the digest stays stale and the next digest check fails with `Digest does not match`. `RESTART REPLICAS` runs the same `doRestartReplica` for every table. The other disruptions added in ClickHouse#129515 stay. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e its definition `doRestartReplica` detached the table, waited for it to become unused, and only then ran `getColumnsDescription` / `getConstraintsDescription`. The latter evaluates a constraint's scalar subquery, so a constraint reading a missing table (or one being restarted at the same time, `TABLE_IS_BEING_RESTARTED`) threw before the `try` block that retries re-creation and adjusts the `DatabaseReplicated` digest. The table then disappeared from the database until server restart. Analyze the stored definition before the table is shut down, outside the exclusive lock (the subquery may need to lock a table that is being restarted); the table's DDL guard, held for the whole restart, keeps the definition from changing until the detach. Move `waitDetachedTableNotInUse` into the `try` block so a kill during the wait also goes through the digest adjustment. Related: ClickHouse#129515 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The random disruptor of the stress test only killed queries, clients and mutations and paused a few background operations. This adds disruptions that change what running queries depend on while they run:
SYSTEM DROP ... CACHE, 20 caches: marks, uncompressed, primary index, page, query, query condition, filesystem, text index and others).RECONNECT ZOOKEEPER,RESTART REPLICAS,FLUSH ASYNC INSERT QUEUE,UNLOAD DICTIONARIES,RELOAD FUNCTIONS,RELOAD USERS,JEMALLOC PURGEandREFRESH ALL BACKGROUND.SYSTEM UNLOAD PRIMARY KEYof a randomMergeTreetable,SYSTEM RELOAD DICTIONARYof a random dictionary, andSYSTEM REFRESH VIEWorSYSTEM CANCEL VIEWof a random refreshable materialized view.SYSTEM RESTART REPLICAof a random replicated table.CLEANUP,PULLING REPLICATION LOG, andLISTENfor the protocols other thanTCPandHTTP, whichclickhouse-testand the hung check use.prepare_for_hung_checkstarts all of them again.A failing disruption is logged instead of ending the disruptor thread. The databases in
KEEP_DATABASESare never touched.Every statement was run against a local server (all of them also exist in 26.3), and the loop ran under a small load; it was not run in CI yet.
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/129515]
Version info
26.11.1.1890-master(included in26.11and later)