Repository navigation
Web UI: make the image-preview gesture discoverable in the link tooltip - #111918
Conversation
The `Ctrl`/`Cmd` + hover image preview is opt-in, so the only thing that tells a user it exists is the tooltip on the link. Say it concisely: `Ctrl/Cmd for preview`. The harness also asserts the complement: a linkified cell that does not qualify for a preview must not advertise the gesture, so the tooltip never promises a preview that will not appear. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Workflow [PR], commit [8a25d44] Summary: ✅
AI ReviewSummaryThis PR shortens the Web UI image-preview tooltip in Final Verdict✅ Approved |
…tdated parts
SYSTEM RESTART REPLICA raises is_being_restarted before flushAndShutdown()
cancels the outdated-parts loading task, so an asynchronous load already in
flight observes the flag when it takes the table lock. lockForShare then threw
TABLE_IS_BEING_RESTARTED into the function-level catch of
loadOutdatedDataParts, which calls std::terminate(). The exception is not in
isRetryableException, so the retryable-error handling of this PR did not cover
it either.
Failing to take the table lock is never an inconsistent set of parts on disk,
so handle both ways it can fail and reschedule:
- The table is being restarted, dropped or detached. tryLockForShare reports
this by returning no lock instead of throwing.
- The timed acquisition expires under contention with a writer, which throws
DEADLOCK_AVOIDED ("Client should retry"). This is also how a restart can
present itself, because the lock is acquired before is_being_restarted is
checked and the restarting query holds it exclusively.
Rescheduling cannot resurrect a cancelled loader: scheduleAfter is a no-op once
the task is deactivated, and deactivate() cancels a delayed run. It matters if
the lifecycle event fails before cancelling the task, when the table stays
alive and only a retry still loads its outdated parts.
Observed on the Stress test (arm_tsan) of PR ClickHouse#110976 and the Stress test
(amd_tsan) of PR ClickHouse#111918, both aborting on table customer_dbt_materialize with
"Loading of outdated parts failed. Will terminate ... Code: 733 ...
(TABLE_IS_BEING_RESTARTED)". This is a distinct trigger from the corrupted
txn_version.txt family of ClickHouse#111053: no part transaction metadata is read on this
path.
Tests, each verified to fail on a binary with only the corresponding change
neutered:
- A restart racing the loader, choreographed with a pauseable failpoint that
parks the loader just before it takes the lock.
- An injected lock-acquisition timeout.
- The function-level retryable catch of each loader, which nothing reached
before: every injected error was absorbed by a worker, scheduling, cleanup or
table-lock handler first. A failpoint in each loader body covers them.
- The retryable arm of loadUnexpectedDataPart, which drops a partially built
part so the retry rebuilds it rather than marking a healthy part broken. The
test requires the loader to re-enter the build path on a retry, since
removing only the reset would otherwise still pass.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
The three CI reds on
The branch has been merged with the latest @groeneai, please investigate the last two failures and provide a fix in a separate PR (if a fix is already in progress, link it here):
|
|
Both of these are known, both already have a tracking issue, and both already have a fixing PR, so no new PR is needed. Details, with the actual aborts read from the job artifacts rather than the CIDB labels. 1. Coverage
and the log line carries One label correction while you are looking at that report: the check page attributes this to 2. Stress amd_tsan
The terminate is meant for a genuinely inconsistent on-disk set of parts, but here it fires on the table lock: stress runs #107091 changes exactly that line to #107091 has been open since 2026-06-10 with no human review yet. It is the one that actually stops this class of server termination, so a look from @alexey-milovidov or whoever owns part loading would be welcome. |
|
Merged the latest Two failures on
@groeneai, please investigate these two and provide fixes in separate PRs (or link the fixes if already in progress); for (1) a tracking issue is also needed. |
|
Thanks - both attributions on the other reds match what I found: On the two you asked about: 1.
|
| occurrence | observed row |
|---|---|
#110531 (amd_asan_ubsan, distributed plan) |
0 0 0 0 0 0 0 0 0 |
#111918 (amd_llvm_coverage, ParallelReplicas) |
1 1 1 1 1 0 1 1 1 (column 6) |
| #112008 (same lane) | 1 1 1 1 1 1 1 0 0 (columns 8, 9) |
So TextIndexLazyBlocksSkippedResolved is column 6 as you say for the failure on this PR, but the failure on #112008 lost columns 8 and 9 (LeapfrogIntersections, AdvanceCount) and #110531 lost all nine.
The per-column shape follows from the contribution table, measured per tagged query:
log_comment c1 c2 c3 c4 c5 c6 c7 c8 c9
04257_pe_alg_leapfrog 12 6 6 0 0 0 0 1 5
04257_pe_or_seg_covered 0 9 9 9 1 0 0 0 0
04257_pe_or_block_covered 3 2 2 1 0 1 0 0 0
...
Columns 5, 6, 8 and 9 each have exactly one contributing query, so if that single query's granule happens to be served by a remote replica, that column alone reads 0. Columns 1-4 and 7 have several contributors, so they survive unless every query goes remote. The table is one granule (index_granularity = 8192 over 2000 rows), so each tagged query's single mark is assigned to exactly one replica - which is where the randomness comes from.
The frequency matches a per-mark assignment race rather than a deterministic mode: over 45 days the two affected lanes are distributed plan 3 bad / 6049 OK and ParallelReplicas 2 bad / 11159 OK, with 0 failures on master, on any release branch, or on any of the ~20 other stateless lanes. parallel_replicas_local_plan is randomized 0/1 at tests/clickhouse-test:1548, so roughly half of the runs on those lanes are in the exposed regime and a minority of those lose a column.
The fix is a one-line pin in the test. SET enable_parallel_replicas = 0 at the top, measured on the same cluster:
- forced
parallel_replicas_local_plan = 0, no pin:0 0 0 0 0 0 0 0 0 - forced
parallel_replicas_local_plan = 0, with pin:1 1 1 1 1 1 1 1 1
The statement-level SET wins over the lane's users.d/enable_parallel_replicas.xml profile, so the pin holds on exactly the lanes that fail. This keeps every assertion intact rather than weakening the "every event must fire" contract, which I would rather not relax - the counters are the only thing standing between a silently disabled skip optimisation and a green test. I will send that as its own PR and post the link here.
One note on the tracking issue: I am not able to open GitHub issues on my own initiative. If you would like it filed, say so and I will open it immediately with the above as the description; otherwise the PR will carry the analysis.
2. Cannot capture column 2 ... got Nullable(UInt64), but UInt64 is expected
This one already has a fix in progress: #111993 (Fix wrong result and LOGICAL_ERROR for a matcher inside a lambda with join_use_nulls / group_by_use_nulls), open, mine.
I confirmed it covers this signature rather than assuming it, by running the family shapes against the pristine master build and against #111993's own prebuilt debug binary:
| shape | master | #111993 |
|---|---|---|
arrayMap(b -> sipHash64(b.*), [1]) ... LEFT JOIN ... ON ... SETTINGS join_use_nulls = 1 |
abort, Cannot capture column 2 ... got Nullable(UInt64), but UInt64 is expected. |
OK |
same with FULL JOIN |
abort, identical message | OK |
same with INNER JOIN |
OK | OK |
Byte-identical message to the one on this PR, and the frames match (ColumnFunction.cpp:383 appendArgument under ExecutableFunctionCapture::executeImpl from ActionsDAG::updateHeader).
Your list of 11 other PRs matches mine except that the signature splits by architecture: over 30 days the phrase spans exactly two STIDs, 3293-4e7f (6 hits, all arm) and 3293-46fa (6 hits, all amd) - same defect, the two arches inline differently. 12 hits, 12 distinct PRs, 0 master or release-branch rows, first seen 2026-07-14.
Two corrections to the classification, both of which reduce the scope of what is owed:
- It is not fuzzer-internal, and not a sixth site of the AST-fuzzer-internal-path: executor/planner assertions on type-invalid inputs the analyzer normally rejects (5 sites:
IColumn,KeyCondition,SingleValueData,ActionsDAG×2) #107951 class. Plain SQL with no fuzzing reaches it: the first row of the table above is a hand-written query. It is a real analyzer bug - a matcher inside a lambda does not see the JOIN's nullability promotion, so the capture's declared argument type and the actual column disagree. - The specific query the fuzzer produced here is not itself runnable -
INNER JOIN (SELECT x, y FROM t2) AS b FINALis rejected withTable expression modifiers FINAL are not supported for subquerybefore planning, on master and on Fix wrong result and LOGICAL_ERROR for a matcher inside a lambda with join_use_nulls / group_by_use_nulls #111993 alike. The fuzzer reached the abort through a different mutation of the same statement, so I attributed by mechanism and message rather than by replaying that exact text.
So no separate PR is owed for (2). #111993 has finished CI and is waiting for review; I will not need to touch it for this.
|
Fixing PR for Your hypothesis was right in mechanism and the root cause turned out to be slightly more specific than "the resolved-skip does not fire": the events do fire, but they are counted on the replica that reads the granule, and remote ProfileEvents are never merged into the initiator's Two corrections to my earlier comment, both in the PR description:
A tracking issue is still needed and I do not open issues on my own initiative, so that offer stands: say the word and I will file it with the analysis above. |
|
Thanks, both are covered:
CI has since re-run on the merged base and both of those are gone. The only remaining red on this PR is |
|
Tracking issue filed: #112377 Two things came out wider than the analysis I posted here, so the issue is not scoped to the text index:
I could not apply labels to the issue myself. |
Follow-up to #109347 addressing #109347 (comment): the image preview is opt-in, so the gesture has to be discoverable. The tooltip of a previewable image link in the Web UI now says
Ctrl/Cmd for preview(it used to sayCtrl+hover (Cmd+hover on Mac) to preview this image).The regression harness (
tests/integration/test_play_image_preview) pins the exact tooltip text, and now also asserts the complement: a linkified cell that does not qualify for a preview - e.g. a URL whose image extension is only in the query or the fragment - must not advertise the gesture, so the tooltip never promises a preview that will not appear.Related: #109347
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not needed: the feature itself is unreleased (it goes into 26.8), and the entry of #109347 already covers it.
Documentation entry for user-facing changes