Skip to content

Restore default config in generate-system-tables-docs to cover system logs - #104287

Merged
alexey-milovidov merged 10 commits into
masterfrom
restore-system-logs-docs-config
May 9, 2026
Merged

alexey-milovidov merged 10 commits into
masterfrom
restore-system-logs-docs-config

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented May 7, 2026 •

Copy link
Copy Markdown
Member

Reinstates utils/generate-system-tables-docs-config.xml as the default config for utils/generate-system-tables-docs and adds <prepare_system_log_tables_on_startup>true</prepare_system_log_tables_on_startup> so that all configured *_log tables are created up-front in clickhouse-local and their schemas are visible in system.columns without requiring a flush.

clickhouse-local already initializes system logs whenever any <*_log> section is present in the config (via hasAnySystemLogConfigured, see programs/local/LocalServer.cpp:1187-1197), so no server-side change was needed; the previous claim in the dropped XML that "log tables are not created in clickhouse-local because initializeSystemLogs requires full server infrastructure" was stale and has been removed.

The included docs regeneration adds previously-missing pages for azure_queue_log, s3queue_log, filesystem_cache_log, filesystem_read_prefetches_log, delta_lake_metadata_log, and transactions_info_log, and refreshes the <!--AUTOGENERATED--> blocks for the remaining *_log tables (query_log, trace_log, text_log, metric_log, error_log, query_thread_log, part_log, crash_log, session_log, opentelemetry_span_log, query_views_log, zookeeper_log, processors_profile_log, asynchronous_insert_log, backup_log, blob_storage_log, query_metric_log, dead_letter_queue, zookeeper_connection_log, aggregated_zookeeper_log, iceberg_metadata_log, predicate_statistics_log, histogram_metric_log, asynchronous_metric_log, background_schedule_pool_log).

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Auto-generated documentation for system log tables (query_log, trace_log, etc.) is now produced from the source by utils/generate-system-tables-docs.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

🤖 Generated with Claude Code

Version info

  • Merged into: 26.5.1.469

…em logs

Reinstates `utils/generate-system-tables-docs-config.xml` as the default
config used by the docs generator and adds
`prepare_system_log_tables_on_startup` so that all configured `*_log`
tables are created up-front in `clickhouse-local` and their schemas are
visible in `system.columns` without requiring a flush.

`clickhouse-local` already initializes system logs whenever any
`<*_log>` section is present in the config (via
`hasAnySystemLogConfigured`), so no server-side change is needed; the
previous claim that "log tables are not created in clickhouse-local
because initializeSystemLogs() requires full server infrastructure" was
stale.

With the default config restored, the docs job now generates entries
for `query_log`, `trace_log`, `text_log`, `metric_log`, `error_log`,
`query_thread_log`, `part_log`, `crash_log`, `session_log`,
`opentelemetry_span_log`, `query_views_log`, `zookeeper_log`,
`processors_profile_log`, `asynchronous_insert_log`, `backup_log`,
`blob_storage_log`, `query_metric_log`, `dead_letter_queue`,
`zookeeper_connection_log`, `aggregated_zookeeper_log`,
`iceberg_metadata_log`, `delta_lake_metadata_log`,
`predicate_statistics_log`, `histogram_metric_log`,
`asynchronous_metric_log`, `background_schedule_pool_log`, and the
previously-undocumented `azure_queue_log`, `s3queue_log`,
`filesystem_cache_log`, `filesystem_read_prefetches_log`, and
`transactions_info_log`.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [7d24872]

Summary: ✅


AI Review

Summary

This PR restores the default config for utils/generate-system-tables-docs, enables eager creation of configured system log tables in clickhouse-local, and regenerates affected system-table docs from updated source descriptions. I found no remaining correctness or documentation-integrity issues in the current head; prior inline issues were addressed in code and corresponding threads were resolved.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-documentation Documentation PRs for the specific code PR label May 7, 2026
Style check was failing because the regenerated `*_log` docs surface
identifiers and descriptions from C++ code that the aspell dictionary
hasn't seen before:

- Add 181 technical terms (class names, methods, events, ZooKeeper
  error codes, etc.) to `ci/jobs/scripts/check_style/aspell-ignore/en/aspell-dict.txt`.
- Fix five typos in metric/event descriptions that ended up in the docs
  via `system.columns`: `constanstans` → `constants`,
  `aggragating` → `aggregating`, `oudated` → `outdated`,
  `acquite` → `acquire`, `idnex` → `index`.

Style check report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104287&sha=437e062f7e7b750dd2147373d010221c890d8539&name_0=PR&name_1=Style%20check

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
alexey-milovidov and others added 3 commits May 7, 2026 20:42
Three follow-ups for the docs regeneration in PR #104287:

1. `docs/en/operations/system-tables/histogram_metric_log.md` had two
   blank lines between the `## Columns {#columns}` header and the
   `<!--AUTOGENERATED_START-->` marker, which tripped the markdownlint
   `MD012/no-multiple-blanks` rule. Drop the extra blank line.

2. `utils/generate-system-tables-docs` produced that double blank line
   itself: `add_markers_to_file` reads `before = content[:after_header]`
   and then appends `"\n\n"`, but the header pattern's trailing `\s*$`
   greedy-consumes the line's terminating newline, leaving `before` with
   one trailing `\n`. The result was `header\n` + `\n\n` =
   `header\n\n\n` — two blank lines. Strip trailing newlines from
   `before` before reattaching the blank-line separator.

3. The autogenerator created a new minimal `delta_lake_metadata_log.md`
   while the existing `delta_metadata_log.md` already declared
   `slug: /operations/system-tables/delta_lake_metadata_log` (filename
   did not match the table name). Two pages with the same slug failed
   the docusaurus build with `Duplicate routes found!`. Move the rich
   hand-written content into `delta_lake_metadata_log.md` (matching the
   table name so future regenerations stay in place) and delete
   `delta_metadata_log.md`.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104287&sha=cf04a7c101f979c2ec406ea755eea5fddeabf2db&name_0=PR&name_1=Docs%20check

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Address review feedback on the regenerated docs:

- `filesystem_read_prefetches_log` referred to `MergeTables` (typo);
  rewrite as `MergeTree tables`.
- `s3queue_log` and `azure_queue_log` shared an identical, ungrammatical
  description (`logging entries with the information files processes by
  S3Queue engine`) — and the `azure_queue_log` variant incorrectly
  pointed at the `S3Queue` engine. Rephrase both as
  `Contains log entries with information about files processed by the
  S3Queue/AzureQueue engine.`

The source comments live in `src/Interpreters/SystemLog.h`; update both
the source and the regenerated markdown so they stay in sync.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The regenerator now emits `**Aliases:**` inside the
`<!--AUTOGENERATED_*-->` block, but the hand-written copies that pre-dated
this change were left in place, so 15 system-table pages rendered the
same alias list twice (once inside the block and once immediately after
it).

Remove the duplicate blocks from `clusters.md`, `columns.md`,
`databases.md`, `dimensional_metrics.md`, `dropped_tables_parts.md`,
`events.md`, `histogram_metrics.md`, `jemalloc_bins.md`, `metrics.md`,
`parts.md`, `processes.md`, `projection_parts.md`,
`projection_parts_columns.md`, `replicas.md`, and `user_processes.md`,
keeping only the autogenerated one.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The `Build docusaurus` job fails to parse `histogram_metric_log.md` and
`backup_log.md` because their autogenerated column descriptions contain
the bare sequence `<=`, which MDX treats as the start of a JSX element.

Update the column comments in `HistogramMetricLog.cpp` and `BackupLog.cpp`
to use the Unicode `≤` character (and wrap the `num_entries ≤ num_files`
expression in a code span, matching the previous wording in `backup_log.md`
on `master`), and refresh the corresponding autogenerated blocks.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104287&sha=6671bce9fe64d2e29b1c70a5514ee9748fecc1ab&name_0=PR&name_1=Docs%20check
PR: #104287
The autogenerated description of the `status` column listed enum values
that did not match the actual `Status` enum defined in
`AsynchronousInsertLog.h` (`Ok` = 0, `ParsingError` = 1, `FlushError` = 2)
and described the column as "Status of the view", which is leftover from
`query_views_log` and not applicable here.

Update the column comment in `AsynchronousInsertLog.cpp` to reference
the correct values and to call it the status of the insert, and refresh
the autogenerated block.

PR: #104287
`ObjectStorageQueueLogElement::getColumnsDescription` is shared between
`system.s3queue_log` and `system.azure_queue_log`, but the column
comments hardcoded "S3Queue table" and "the object in s3", which is
misleading on the `azure_queue_log` page after the docs regeneration.

Rephrase the affected comments in `ObjectStorageQueueLog.cpp` to
reference both engines (`S3Queue` or `AzureQueue`) and to talk about
"object storage" instead of `s3`, then refresh the autogenerated blocks
in both pages. Also add trailing periods so the column descriptions are
consistent with the rest of the file.

PR: #104287
@clickhouse-gh

clickhouse-gh Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 91.10% 91.10% +0.00%
Branches 76.50% 76.60% +0.10%

Changed lines: 100.00% (73/73) · Uncovered code

Full report · Diff report

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it works. Plus, it fixed a lot of typos and did updates throughout.

@alexey-milovidov alexey-milovidov self-assigned this May 9, 2026
@alexey-milovidov
alexey-milovidov requested a review from Blargian May 9, 2026 10:41
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue May 9, 2026
Merged via the queue into master with commit 6a07705 May 9, 2026
165 checks passed
@alexey-milovidov
alexey-milovidov deleted the restore-system-logs-docs-config branch May 9, 2026 10:54
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-documentation Documentation PRs for the specific code PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants