Skip to content

Derive DATA_PATH only after the detach gate in 04624_part_loading_tree_rollback_startup_recovery - #111730

Merged
alexey-milovidov merged 1 commit into
masterfrom
followup-111661-04624-derive-data-path-after-gate
Jul 24, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
followup-111661-04624-derive-data-path-after-gate

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Description

Follow-up to #111661 (merged), addressing the remaining review comment on 04624_part_loading_tree_rollback_startup_recovery.sh: the detach-postcondition gate alone did not prove that the copy source exists. If a stress-test restart lands on the earlier INSERT or on the SELECT data_paths[1] client call, the gate could still pass while DATA_PATH is empty or the part all_1_1_0 is missing; under plain bash the cp/printf would then fail silently, recover_leaked_table would re-attach a healthy table, and the test would print the reference output without ever fabricating the corrupted txn_version.txt it is supposed to recover from.

Now DATA_PATH is derived only after the detach gate, from system.detached_tables.uuid and system.disks (the same way recover_leaked_table does), and the test fails fast unless the source part directory ${DATA_PATH}all_1_1_0 exists before the out-of-band copy.

The test output is unchanged; it passes locally against a 26.7.1 server.

Related: #111661
Related: #111055

Changelog category (leave one):

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

…tree_rollback_startup_recovery`

Follow-up to #111661, addressing the
remaining review comment: the detach-postcondition gate alone did not prove that the
copy source exists. If a stress-test restart lands on the earlier `INSERT` or on the
`SELECT data_paths[1]` client call, the gate could still pass while `DATA_PATH` is
empty or the part `all_1_1_0` is missing; under plain `bash` the `cp`/`printf` would
fail silently and the test would print the reference output without ever fabricating
the corrupted `txn_version.txt` it is supposed to recover from.

Now `DATA_PATH` is derived only after the gate, from `system.detached_tables.uuid`
and `system.disks` (the same way `recover_leaked_table` does), and the test fails
fast unless the source part directory exists before the out-of-band copy.

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [fc58ad1]

Summary: ✅


AI Review

Summary

This follow-up moves DATA_PATH derivation behind the permanent-detach postcondition and adds an explicit source-part existence check in 04624_part_loading_tree_rollback_startup_recovery.sh. That closes the remaining plain-bash silent-success window described in the PR, and I did not find correctness or test-contract issues in the current patch.

Final Verdict

Status: ✅ Approve

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@alexey-milovidov alexey-milovidov self-assigned this Jul 24, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 24, 2026
Merged via the queue into master with commit 42c9d2b Jul 24, 2026
179 checks passed
@alexey-milovidov
alexey-milovidov deleted the followup-111661-04624-derive-data-path-after-gate branch July 24, 2026 21:11
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 24, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…04624-derive-data-path-after-gate

Derive `DATA_PATH` only after the detach gate in `04624_part_loading_tree_rollback_startup_recovery`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci 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.

2 participants