Skip to content

fix(linux-clickhouse): read the process list before the query log - #3449

Merged
datlechin merged 1 commit into
linuxfrom
fix/linux-clickhouse-mutation-resolution
Oct 16, 2026
Merged

datlechin merged 1 commit into
linuxfrom
fix/linux-clickhouse-mutation-resolution

Conversation

@datlechin

Copy link
Copy Markdown
Member

Why

A ClickHouse write that ran past its deadline could resolve as Unresolvable even though it applied. That is the Docker test flake from #3437. The resolver read system.query_log, then system.processes. An ALTER that finished between the two reads was in neither.

Change

  • Read system.processes first, then flush and read the log. The server queues a statement's last log entry before it takes the statement off the list, so a statement that ends between the reads is either still listed or has its end in the flushed log.
  • A login without a grant on system.processes resolves from the log alone instead of failing with ACCESS_DENIED. ClickHouse 25.8's stock config sets select_from_system_db_requires_grant.

Verified

  • New an_alter_that_ends_between_the_list_and_the_log_is_applied holds the ALTER with SYSTEM STOP MERGES and lets it finish between the two reads. The old order answered Unresolvable there.
  • New resolve_refused_the_process_list_answers_from_the_log failed on the old code with error 497.
  • The ClickHouse Docker suite ran 6 times. The MySQL 8.4 and MariaDB 11.4 DDL suites pass.

Not in this PR

  • commit_with_no_record_is_unresolvable and calls_share_one_call_options each failed once while a build ran beside the suite, and passed in every later run.

@datlechin
datlechin merged commit 1898e11 into linux Oct 16, 2026
16 checks passed
@datlechin
datlechin deleted the fix/linux-clickhouse-mutation-resolution branch October 16, 2026 15:32
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