Skip to content

Backport #114826 to 26.3: Hold the table lock across a lightweight UPDATE pipeline - #116863

Merged
PedroTadim merged 7 commits into
26.3from
backport/26.3/114826
Sep 10, 2026
Merged

PedroTadim merged 7 commits into
26.3from
backport/26.3/114826

Conversation

@robot-clickhouse-ci-2

@robot-clickhouse-ci-2 robot-clickhouse-ci-2 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #114826
Cherry-pick pull-request #116463

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.3.33.39

@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Aug 28, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [177fbbc]

Summary: ✅

alexey-milovidov and others added 4 commits August 30, 2026 18:16
…onfig.sh on 26.3

The backported test `04905_lwu_drop_race_table_lock` uses `CLICKHOUSE_DATABASE_1`,
which master defines in `tests/queries/shell_config.sh` but 26.3 does not. With the
variable empty, `DROP DATABASE IF EXISTS` failed with a syntax error at the end of the
query. Bring the two exports from master to 26.3.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=116863&sha=b22f795e097ee7c449e1e1aeeda4c26c668cbb68&name_0=BackportPR
PR: #116863

Co-Authored-By: Claude Fable 5 <[email protected]>
…OINT` on disable

The backported test `04905_lwu_drop_race_table_lock` needs two `FailPoint`
fixes that master already has but `26.3` does not.

`getFailPoints` reported `enabled` through `fiu_fail`, which *fires* the fail
point instead of only inspecting it. A single
`SELECT enabled FROM system.fail_points` therefore consumed every armed
`ONCE`/`PAUSEABLE_ONCE` fail point. The test arms
`rmt_pause_before_commit_local_part` and then reads `system.fail_points` to
check that the arm took effect, which consumed the one shot before the
`ReplicatedMergeTree` sink could reach it, so the sink never parked and the
test reported `the sink never reached the commit hook` for all three arms.
Report `enabled` through `fiu_status`, which inspects without firing.

`disableFailPoint` also erased the channel while a concurrent
`SYSTEM WAIT FAILPOINT ... PAUSE` was still waiting for
`pause_epoch > resume_epoch`, so that wait never woke up - which is what
produced the `Some queries hung` failure in the same job. Mark the channel
`disabled` and let `waitForPause` return on it.

Both hunks match master.
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Pushed f26bfee477ba: merged 26.3 and ported the two FailPoint fixes this backported test needs.

Root cause of the remaining red (reproduced locally against the 26.3 build of this PR):

  • FailPointInjection::getFailPoints on 26.3 reported enabled through fiu_fail, which fires the fail point rather than only inspecting it. So a single SELECT enabled FROM system.fail_points consumed every armed ONCE/PAUSEABLE_ONCE fail point. Verified on the 26.3 binary of this PR: after SYSTEM ENABLE FAILPOINT rmt_pause_before_commit_local_part, the first read returns 1 and the second returns 0 with nothing else running. The test arms the fail point and then reads system.fail_points as evidence that the arm took effect, which consumed the one shot before the ReplicatedMergeTree sink could reach it — hence the sink never reached the commit hook on all three arms. Fixed by reporting enabled through fiu_status.
  • disableFailPoint erased the channel while a concurrent SYSTEM WAIT FAILPOINT ... PAUSE was still waiting for pause_epoch > resume_epoch, so that wait never woke — which is what produced the Some queries hung failure in the same job. Fixed with the disabled flag that waitForPause also accepts.

Both hunks are identical to what master already has; master is why the test passes there and not on 26.3.

alexey-milovidov and others added 2 commits September 8, 2026 03:34
The previous commit on this backport branch made `system.fail_points`
non-destructive by reading the state with `fiu_status` instead of
`fiu_fail`, but `26.3` pins `contrib/libfiu` at `94f7114`, which predates
the ClickHouse fork commit that added `fiu_status`. Every build job failed
with `error: use of undeclared identifier 'fiu_status'`.

Move the gitlink to `74bc382`, the same revision `master` uses. The range
`94f7114..74bc382` is purely additive - it only adds `fiu_status` and its
bindings, manual page and test - so nothing else in `26.3` changes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Pushed 177fbbce2c99: merged 26.3 and fixed the build red from the previous push.

Every Build (*) job failed with error: use of undeclared identifier 'fiu_status' in src/Common/FailPoint.cpp. The fiu_status call I introduced last time is what master uses, but master also pins a newer contrib/libfiu: fiu_status was added to the ClickHouse fork of libfiu in 123397b (fork PR #7), which lands in 74bc382 — the revision master points at. 26.3 still pinned 94f7114, which predates it, so the declaration in libfiu/fiu-control.h was simply absent.

Moved the contrib/libfiu gitlink on this branch to 74bc382. The range 94f7114..74bc382 is purely additive (+119 / -0): it only adds fiu_status, its Python binding, manual page and test, so nothing else on 26.3 is affected, and contrib/libfiu-cmake/CMakeLists.txt is already byte-identical to master's and already compiles libfiu/fiu.c, so no CMake change is needed.

Verified locally by compiling src/Common/FailPoint.cpp against the bumped submodule — clean.

@PedroTadim
PedroTadim merged commit fb91317 into 26.3 Sep 10, 2026
35 checks passed
@PedroTadim
PedroTadim deleted the backport/26.3/114826 branch September 10, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants