Skip to content

Fix assertion failure in applyUncommittedState for deltas without paths#95846

Merged
antonio2368 merged 3 commits intomasterfrom
fix-keeper-apply-uncommitted-state-empty-path
Feb 3, 2026
Merged

Fix assertion failure in applyUncommittedState for deltas without paths#95846
antonio2368 merged 3 commits intomasterfrom
fix-keeper-apply-uncommitted-state-empty-path

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

The applyUncommittedState function was calling applyDelta for all deltas without checking if the delta has a path. However, some delta types (AddAuthDelta, CloseSessionDelta, etc.) are created with empty paths and require separate handling.

This caused a chassert(!delta.path.empty()) assertion failure during snapshot application in multinode Keeper setups.

The fix adds the same path checking logic that already exists in applyDeltas: only call applyDelta when the path is non-empty, and handle AddAuthDelta and CloseSessionDelta separately.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

See https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=5c363d43316a01d8b2b9ffe4a2f66a64f76df6f5&name_0=MasterCI&name_1=Integration%20tests%20%28amd_asan%2C%20db%20disk%2C%20old%20analyzer%2C%204%2F6%29&name_1=Integration%20tests%20%28amd_asan%2C%20db%20disk%2C%20old%20analyzer%2C%204%2F6%29

…aths

The `applyUncommittedState` function was calling `applyDelta` for all deltas
without checking if the delta has a path. However, some delta types
(`AddAuthDelta`, `CloseSessionDelta`, etc.) are created with empty paths
and require separate handling.

This caused a `chassert(!delta.path.empty())` assertion failure during
snapshot application in multinode Keeper setups.

The fix adds the same path checking logic that already exists in
`applyDeltas`: only call `applyDelta` when the path is non-empty,
and handle `AddAuthDelta` and `CloseSessionDelta` separately.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Feb 2, 2026

Workflow [PR], commit [27ced5e]

Summary:

job_name test_name status info comment
Stress test (amd_tsan) failure
Logical error: Block structure mismatch in A stream: different number of columns: (STID: 0993-2da1) FAIL cidb, issue
Stress test (arm_asan, s3) failure
Logical error: Block structure mismatch in A stream: different number of columns: (STID: 0993-38e6) FAIL cidb, issue
Upgrade check (amd_msan) failure
Error message in clickhouse-server.log (see upgrade_error_messages.txt) FAIL cidb
AST fuzzer (arm_asan) failure
Logical error: Cannot convert nested result of function A with type B to the expected result type C: D (STID: 4827-6033) FAIL cidb

@clickhouse-gh clickhouse-gh bot added the pr-ci label Feb 2, 2026
@antonio2368 antonio2368 force-pushed the fix-keeper-apply-uncommitted-state-empty-path branch from 2c7e52d to 27ced5e Compare February 3, 2026 09:34
@antonio2368 antonio2368 added this pull request to the merge queue Feb 3, 2026
@antonio2368 antonio2368 added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Feb 3, 2026
Merged via the queue into master with commit 4d45ace Feb 3, 2026
129 of 134 checks passed
@antonio2368 antonio2368 deleted the fix-keeper-apply-uncommitted-state-empty-path branch February 3, 2026 13:02
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Feb 3, 2026
robot-clickhouse added a commit that referenced this pull request Feb 3, 2026
robot-clickhouse added a commit that referenced this pull request Feb 3, 2026
robot-clickhouse added a commit that referenced this pull request Feb 3, 2026
robot-clickhouse added a commit that referenced this pull request Feb 3, 2026
robot-clickhouse added a commit that referenced this pull request Feb 3, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 3, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Feb 3, 2026
clickhouse-gh bot added a commit that referenced this pull request Feb 3, 2026
Backport #95846 to 26.1: Fix assertion failure in `applyUncommittedState` for deltas without paths
clickhouse-gh bot added a commit that referenced this pull request Feb 3, 2026
Backport #95846 to 25.12: Fix assertion failure in `applyUncommittedState` for deltas without paths
antonio2368 added a commit that referenced this pull request Feb 4, 2026
Backport #95846 to 25.3: Fix assertion failure in `applyUncommittedState` for deltas without paths
antonio2368 added a commit that referenced this pull request Feb 4, 2026
Backport #95846 to 25.8: Fix assertion failure in `applyUncommittedState` for deltas without paths
antonio2368 added a commit that referenced this pull request Feb 4, 2026
Backport #95846 to 25.11: Fix assertion failure in `applyUncommittedState` for deltas without paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-ci pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants