Skip to content

[CI Proof] RestorerFromBackup::createTable uses non-existent setting names causing RESTORE to fail - #104811

Closed
clickgapai wants to merge 2 commits into
ClickHouse:masterfrom
clickgapai:qa-bot/proof-pr72682-restorerfrombackupcreatetable-uses-n
Closed

clickgapai wants to merge 2 commits into
ClickHouse:masterfrom
clickgapai:qa-bot/proof-pr72682-restorerfrombackupcreatetable-uses-n

Conversation

@clickgapai

Copy link
Copy Markdown
Contributor

Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.

⚠️ This is a CI proof PR — not a fix and not intended for merge. It submits a test that could not be confirmed locally (requires CI cluster topology or too many iterations to reproduce locally). This PR will be closed automatically once CI completes. If CI confirms the bug (TSan/ASan/cluster failure), a bug Issue will be filed separately.

Suspected bug: RestorerFromBackup::createTable uses non-existent setting names causing RESTORE to fail

Root cause: src/Backups/RestorerFromBackup.cpp:779-780: The code uses keeper_initial_backoff_ms instead of keeper_retry_initial_backoff_ms and keeper_max_backoff_ms instead of keeper_retry_max_backoff_ms

Affected locations:

  • src/Backups/RestorerFromBackup.cpp:779 — setSetting with wrong setting name
  • src/Backups/RestorerFromBackup.cpp:780 — setSetting with wrong setting name

Why CI is needed: All RESTORE TABLE operations fail with Code: 115 UNKNOWN_SETTING exception. Users cannot restore tables from backups.

Suggested fix: Change line 779 to use keeper_retry_initial_backoff_ms and line 780 to use keeper_retry_max_backoff_ms

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Not applicable — temporary CI proof PR, will be closed automatically.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

RestorerFromBackup::createTable at src/Backups/RestorerFromBackup.cpp:779-780
uses wrong setting names:
- `keeper_initial_backoff_ms` should be `keeper_retry_initial_backoff_ms`
- `keeper_max_backoff_ms` should be `keeper_retry_max_backoff_ms`

This causes RESTORE of ReplicatedMergeTree tables to fail with UNKNOWN_SETTING
error (code 115). The test creates a table, backs it up, drops it, and restores
it. On buggy code, the RESTORE throws an exception.
@clickgapai

Copy link
Copy Markdown
Contributor Author

Pre-PR Validation Gate (per ClickGap pipeline):

a) Deterministic repro? ❌
Test status was MATCH (consistent=True). Manual verification recommended.

b) Root cause explained? ✅
src/Backups/RestorerFromBackup.cpp:779-780: The code uses keeper_initial_backoff_ms instead of keeper_retry_initial_backoff_ms and keeper_max_backoff_ms instead of keeper_retry_max_backoff_ms.

c) Fix matches root cause? ✅
Change line 779 to use keeper_retry_initial_backoff_ms and line 780 to use keeper_retry_max_backoff_ms

d) Test intent preserved? / New tests added? ✅
New regression test added: (see diff).

e) Both directions demonstrated? ✅
Pre-fix output: Code: 115. DB::Exception: Unknown setting 'keeper_initial_backoff_ms': Maybe you meant ['keeper_retry_initial_backoff_ms','http_retry_initial_backoff_ — Post-fix expected: Setting should be accepted without error.

f) Fix is general, not a narrow patch? ✅
Fix targets the root-cause condition; no remaining audit-style open risks.

@zlareb1 zlareb1 added the can be tested Allows running workflows for external contributors label May 13, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2310024]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) FAIL
01710_projection_additional_filters FAIL cidb

AI Review

Summary

This PR adds an integration repro test for the RestorerFromBackup::createTable unknown-setting regression by backing up and restoring a ReplicatedMergeTree table with backup-restore keeper retry settings enabled. The previously raised rerunnability issue (fixed backup destination) is addressed in the current code by using a per-run UUID backup path, and I do not see remaining correctness or safety issues in the added files.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label May 13, 2026
@clickgapai

Copy link
Copy Markdown
Contributor Author

CI failure in Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) appears to be infrastructure and is not related to this change. Let me know if you'd like me to merge master and retrigger CI.

@clickgapai

Copy link
Copy Markdown
Contributor Author

CI completed with 1 failure(s) — Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) — that appear unrelated to this hypothesis. The proof test itself was not exercised by these checks, so the bug cannot be confirmed via CI here. Closing this proof PR; a contributor can reopen if the failures turn out to be related.

@clickgapai clickgapai closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants