Skip to content

ci: run the ClickHouse DBMS tests with synchronous mutations - #19

Open
alexey-milovidov wants to merge 1 commit into
mainfrom
ci-pin-sync-mutations
Open

alexey-milovidov wants to merge 1 commit into
mainfrom
ci-pin-sync-mutations

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

The DBMS Tests (ClickHouse) job has been flaky on main: it failed on 2026-08-17, 08-27, 08-28 and 09-02, each time on a different set of TLP tests. It also failed twice on #18 (run).

The cause is that the job starts clickhouse/clickhouse-server:head with no settings overrides, so ALTER ... DELETE and ALTER ... UPDATE run asynchronously. If a mutation finishes between the two reads of one TLP check, the oracle reports a mismatch that is only a race. Every reproducer from #18's two runs ends with such a mutation. For example, SELECT * FROM t1, t0 returned 132 rows, then the partitioned query returned 0 after ALTER TABLE t0 DELETE WHERE (-773830143) AND (2147483648).

This PR mounts the provider's own .claude/clickhouse-config/*.xml into the container. These are the same overrides the ClickHouse nightly SQLancer job uses:

  • Files that contain <profiles> (mutations_sync = 2, alter_sync = 2, async_insert = 0) go into users.d.
  • The rest (log level, disabled system logs) go into config.d.

Each file is mounted on its own, so the directories the entrypoint writes into stay writable. The setup step now also checks that the settings took effect, so a broken mount fails setup instead of showing up later as flaky oracles.

Checked locally by running the modified step against the current :head image:

  • The server comes up and the check reads 2 2 false.
  • Right after ALTER TABLE t0 DELETE WHERE (-773830143) AND (2147483648) returns, count() is 0 and system.mutations has no unfinished entries.

Related: #18

🤖 Generated with Claude Code

The `DBMS Tests (ClickHouse)` job started `clickhouse/clickhouse-server:head`
with no overrides, so `ALTER ... DELETE` / `UPDATE` ran asynchronously. When
such a mutation finishes between the two reads of one TLP check, the oracle
reports a mismatch that is only a race, e.g. `SELECT * FROM t1, t0` returns 132
rows and the partitioned query returns 0 after
`ALTER TABLE t0 DELETE WHERE (-773830143) AND (2147483648)`. This made the job
red on `main` on 2026-08-17, 08-27, 08-28 and 09-02 and on
#18 (twice, every reproducer ending
with an asynchronous `ALTER ... DELETE`).

Mount the provider's own `.claude/clickhouse-config/*.xml` into the container,
the same overrides the ClickHouse nightly job uses: the files with `<profiles>`
(`mutations_sync = 2`, `alter_sync = 2`, `async_insert = 0`) into `users.d`,
the rest into `config.d`. The step now also checks that the settings took
effect, so a broken mount fails setup instead of producing flaky oracles.

https://github.com/ClickHouse/sqlancer/actions/runs/35804199348

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant