Repository navigation
Fix flaky test 05055_format_schema_source_query_background_access when the session date is ahead of the server date - #127797
Conversation
…ependent
The test rendered its start instant in the randomized session time zone and
bounded the text_log scan with `event_date >= toDate('<start>')`, while
`text_log.event_date` is computed in the server time zone. When the session
date runs ahead of the server date (CI: Africa/Khartoum or Africa/Juba vs
Europe/Amsterdam, 22:00-23:00 UTC since Amsterdam left DST on 2026-10-25),
every text_log part was pruned and the refusal was never found.
Capture the start as a Unix timestamp in microseconds, compare
`event_time_microseconds` against it directly, and bound the partition scan
with `event_date >= yesterday()`.
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 over 2 Gate B runs on the same tree; second run after a PR-text correction: 0 findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261025-231700 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261025-225800 |
|
cc @al13n321, could you review this and add the |
|
Workflow [PR], commit [39c6397] Summary: ✅ AI ReviewSummaryThe PR fixes time-zone-dependent failures in Missing context / blind spots
Final Verdict✅ Approve |
59f2701
|
Backporting to fix CI |
Backport #127797 to 26.10: Fix flaky test `05055_format_schema_source_query_background_access` when the session date is ahead of the server date
Backport #127797 to 26.9: Fix flaky test `05055_format_schema_source_query_background_access` when the session date is ahead of the server date
Backport #127797 to 26.8: Fix flaky test `05055_format_schema_source_query_background_access` when the session date is ahead of the server date
Backport #127797 to 26.3: Fix flaky test `05055_format_schema_source_query_background_access` when the session date is ahead of the server date
No conflicts. Picks up the fix for the flaky `05055_format_schema_source_query_background_access` test (ClickHouse#127797). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E5v7QTSR65LdYnQEv9HJVu
…query_background_access` when the session date is ahead of the server date
…query_background_access` when the session date is ahead of the server date
…query_background_access` when the session date is ahead of the server date
…_query_background_access` when the session date is ahead of the server date
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
05055_format_schema_source_query_background_accessprintsbackground flush refused: 0instead of1when it runs between 22:00 and 23:00 UTC withsession_timezone=Africa/KhartoumorAfrica/Juba. On 2026-10-25 alone that happened 13 times, on 8 unrelated PRs and on master (master report); each time the runner's own diagnosis names--session_timezoneas the culprit. No related open issue found.The test rendered its start time with
toString(now64(6)), i.e. in the session time zone, and bounded thesystem.text_logscan withevent_date >= toDate('<start>').text_log.event_dateis computed in the server time zone (Europe/Amsterdamin CI). Since Amsterdam left DST on 2026-10-25, UTC+2 is one hour ahead of it, so during that hour the session date is the server date + 1 and everytext_logpart is pruned: the refusal row is logged but never matched. Unfixed, this recurs every day until 2027-03-28.The start is now captured as
toUnixTimestamp64Micro(now64(6))and compared throughfromUnixTimestamp64Micro, so the time bound no longer depends on the session time zone. The partition bound is the usualevent_date >= yesterday(), which stays at or before the server date while the session zone is less than a day ahead of the server zone (CI drawssession_timezonefrom UTC-7 and UTC+2 zones or the local one). Test-only; the reference is unchanged.Validation, master debug binary, server
TZ=Etc/GMT+12with clientsession_timezone=Etc/GMT-12(session date always one day ahead): the unfixed test fails 3/3 with the CI diff and passes 3/3 without the client override; the fixed test passes 20/20. The fixed test also passes 5/5 with the reverse pair, 5/5 withEurope/Amsterdam+Africa/Khartoum, and 50/50 fully randomized.Workflow [PR]
Sync PR [sync-upstream/pr/127797]
Version info
26.11.1.877-master(included in26.11and later)