Repository navigation
Conversation
`05480_autopr_plan_based_group_by_order_by_top_k` failed in the private
`Stateless tests (amd_jemalloc_uaf, meta in keeper, s3 storage, parallel)`
job with its last four rows missing: the output divisor that the final
query reads from the `AutoParallelReplicas` "The applied formula" line in
`system.text_log`.
The query_log block right above it showed `AutoParallelReplicasApplied = 1`
for the same queries, and that event is counted only after the line is
logged, so the line was logged and lost on its way to `system.text_log`.
That table is best effort: `SystemLogQueue` ignores entries past
`max_size_rows` until the next flush ("Queue had been full ... ignored N
logs"), the async logger drops on overflow, a failed flush loses its batch,
and the table keeps only the levels its logger lets through.
The test is now a `.sh` test that runs the same SQL with
`send_logs_level = trace` and `--server_logs_file`, and reads the divisor
from the lines of each initial `q05480_priced_*` query (by `query_id`) in
that file. The client receives the line through the query's own logs
queue, which is unbounded and filled before any `text_log` handling. The
reference is unchanged.
Validated on the master debug build: with `<text_log><level>debug</level>`
the old test fails 3/3 with exactly those four rows absent and the new one
passes 3/3; with a 16-row `text_log` queue the old one fails 10/10 (33 of
40 rows lost) and the new one passes 10/10; the new one passes 50/50 with
random settings (`-j 8`), 20/20 without, and 30/30 with async logging.
With `enable_group_by_top_k_optimization = 0` the new extraction reads a
divisor of 3, so it reads the live value.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (1 nit).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261123-012400 |
|
cc @devcrafter, could you review this? Test-only fix: 05480_autopr_plan_based_group_by_order_by_top_k reads the applied-formula divisor from the client's server logs instead of system.text_log, which lost the line in private CI |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261123-010700 |
|
Workflow [PR], commit [cf578f4] Summary: ✅ AI ReviewSummaryPR #133636 converts Final VerdictStatus: ✅ Approve |
Related: #116577
Related: #125888
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required.
Description
05480_autopr_plan_based_group_by_order_by_top_k(added in #125888) failed in the privateStateless tests (amd_jemalloc_uaf, meta in keeper, s3 storage, parallel)job (reported on #116577): its last four rows were missing. They come from the final query, which reads the output divisor from theAutoParallelReplicas"The applied formula" line insystem.text_log. Only these rows were reported missing, so the query_log block above it still hadAutoParallelReplicasApplied = 1, and that event is counted only after the line is logged: the line was logged and then lost on its way tosystem.text_log. That table is best effort:SystemLogQueueignores entries pastmax_size_rowsuntil the next flush, the async logger drops on overflow, a failed flush loses its batch, and the table keeps only the levels its logger lets through. The public CI has no such failure in about 4900 runs.The test is now a
.shtest that runs the same SQL withsend_logs_level = traceand--server_logs_file, and reads the divisor of each initialq05480_priced_*query from that file byquery_id. The client gets the line through the query's own logs queue, which is unbounded and filled before anytext_loghandling; a.sqltest cannot read that stream. The reference is unchanged.05218_autopr_set_building_plan_is_left_alonereads a line of the same logger fromsystem.text_logtoo, but has not failed this way, so it is left as is.Validation on a master debug build: with
text_logat leveldebugthe old test fails 3/3 with exactly these four rows missing, and with a 16-rowtext_logqueue it fails 10/10; the new test passes both. It also passes 50/50 with random settings, 20/20 without, and 30/30 with async logging. Withenable_group_by_top_k_optimization = 0it reads a divisor of 3, so it checks the live value.Workflow [PR]
Sync PR [sync-upstream/pr/133636]