Repository navigation
Bound the system.text_log scans of test 05061_replicated_database_logs_to_keep_clamp by the test start time - #123652
Conversation
…s_to_keep_clamp The three poll helpers `cleanups()`, `lost_warnings()` and `initializations()` filtered `system.text_log` only by `logger_name` and `message`. The table is ordered by `(event_date, event_time)`, so every call read the whole server log. On MasterCI 2ce7394 (`Stateless tests (amd_tsan, s3 storage, parallel, 2/3)`) each of those scans read 1.9-2.2M rows and took 30-178 s under the randomized settings draw, so the test hit the 600 s timeout although every wait loop exited on its first poll. Capture the server clock once before the database is created and bound the three scans to `event_date >= yesterday() AND event_time >= toDateTime($test_start)`. Every line the test counts is written after `CREATE DATABASE`, so the counts and the reference are unchanged. The bound is anchored rather than sliding (`now() - 600`) so a scan reads only what the test itself produced, and a baseline taken earlier can never count a row that a later poll no longer sees. 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; 1 finding; bounded: 1 full pass + 1 fix round + 1 delta recheck).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-10:20261003-044100 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261003-042300 |
|
Workflow [PR], commit [9832bdd] Summary: ✅ AI ReviewSummaryThis PR narrows the three Final Verdict
|
04401_http_query_parameters_not_leaked_to_logs bounded its six system.text_log reads only by `event_time >= now() - INTERVAL 600 SECOND`, so every read scanned the last ten minutes of the whole server's log. On the parallel `Stateless tests (arm_binary, ParallelReplicas, s3 storage, parallel)` server that is ~4.7M rows / ~120 MB of `message` per scan, and with `remote_filesystem_read_method = 'read'`, `enable_filesystem_cache = 0` and 1 MiB remote read tasks the five `message LIKE` scans took 97-222 s each, so the test hit the 600 s timeout (ClickHouse#123752, ClickHouse#122362). Take `toUnixTimestamp(now())` before the first request and bound all six reads with `event_time >= toDateTime(test_start)`, as ClickHouse#123652 did for 05061. Every asserted line is logged after that point, so the reference is unchanged; text_log is ordered by (event_date, event_time), so the bound prunes the read to the test's own granules. Locally, with 681K rows in the ten-minute window, a scan reads 381 rows instead of 681,982. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #118103
Related: #103290
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
05061_replicated_database_logs_to_keep_clamptimed out on master inStateless tests (amd_tsan, s3 storage, parallel, 2/3). No related open issue found.Its poll helpers
cleanups(),lost_warnings()andinitializations()count the test's ownDDLWorkerlines insystem.text_log, filtered only bylogger_nameandmessage. The table is ordered by(event_date, event_time), so every call reads the whole server log. In that job'squery_log, each scan read 1.9-2.2M rows and took 30-178 s under the randomized settings (enable_multiple_prewhere_read_steps = 0, for one, readsmessagefor every row), while every wait loop exited on its first poll: the time went into the scans. The runner's two reruns with the same settings spent 655 s and 656 s in them; five reruns without randomized settings, 1.3-1.5 s.Change. Take
toUnixTimestamp(now())once beforeCREATE DATABASEand addevent_date >= yesterday() AND event_time >= toDateTime($test_start)to the three scans. Every counted line is logged afterCREATE DATABASE, so the counts and the.referenceare unchanged. The bound is the test start rather thannow() - 600, becausetext_loggrew by about 42k rows per minute in that job, so a ten-minute window would still hold about 420k rows.Validation (master debug build, Keeper,
system.text_logpadded to 1.4M rows, the failing job's I/O settings forced):toDateTime(0)as the bound): back to 1.40M rows per scan;🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/123652]
Version info
26.10.1.1420-master(included in26.10and later)