Skip to content

Name the S3 disk retry options as the code reads them - #118955

Merged
Blargian merged 1 commit into
masterfrom
s3-disk-retry-option-names-118444
Sep 9, 2026
Merged

Name the S3 disk retry options as the code reads them#118955
Blargian merged 1 commit into
masterfrom
s3-disk-retry-option-names-118444

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Sep 9, 2026

Copy link
Copy Markdown
Member

In a storage_configuration disk section of type s3, the documented options retry_attempts and single_read_retries are read by nothing: S3Settings::loadFromConfigForObjectStorage builds S3RequestSettings with the s3_ prefix, so the keys the code probes are s3_retry_attempts and s3_max_single_read_retries. A user who lowers the retry count to fail over to another volume quickly silently keeps the default of 500 retries with growing backoff.

The documentation and the example embedded in the server source now name the options the code reads. Renaming what the code accepts instead would be the wrong half of the fix: a configuration that has silently carried retry_attempts for years would suddenly take effect, and retry_attempts set to 0 is exactly the value some of them carry. The listed default is corrected too - S3::DEFAULT_RETRY_ATTEMPTS is 500, not 10.

The retry_attempts spellings left in this repository's own integration-test configurations are deliberately untouched: they are dead keys, and making them live would change what those tests exercise.

Only the source of truth is edited; the generated region of docs/reference/engines/table-engines/mergetree-family/mergetree.mdx is left to the documentation autogeneration workflow.

Closes: #118444
Related: #118440

Changelog category (leave one):

  • Documentation (changelog entry is not required)

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

...


Workflow [PR]
Sync PR [sync-upstream/pr/118955]

Version info

  • Merged into: 26.9.1.1077 (included in 26.9 and later)

In a `storage_configuration` disk section of type `s3`, nothing reads
the documented `retry_attempts` and `single_read_retries`:
`S3Settings::loadFromConfigForObjectStorage` builds `S3RequestSettings`
with the `s3_` prefix, so the keys probed are `s3_retry_attempts` and
`s3_max_single_read_retries`. A user who lowers the retry count to fail
over to another volume quickly silently keeps the default of 500 retries
with growing backoff.

The documentation page and the example embedded in the server source now
name the options the code reads, and the listed default is corrected -
`S3::DEFAULT_RETRY_ATTEMPTS` is 500, not 10. Teaching the code to accept
the documented spelling instead would be the wrong half of the fix: a
configuration that has silently carried `retry_attempts` for years would
suddenly take effect, and `0` is exactly the value some of them carry.

The `retry_attempts` spellings in this repository's own integration-test
configurations are left alone for the same reason: they are dead keys,
and making them live would change what those tests exercise. Only the
source of truth is edited; the generated region of the MergeTree
documentation page is left to the documentation autogeneration workflow.
@mintlify

mintlify Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
ClickHouse-docs 🟢 Ready View Preview Sep 9, 2026, 5:04 AM

@clickhouse-gh

clickhouse-gh Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [4bf00b9]

Summary:

job_name test_name status info comment
AST fuzzer (amd_release, oracle) ERROR

AI Review

Summary

This PR fixes the two S3 disk retry option names in the English configuration docs and the MergeTree documentation source so they match the parser's s3_-prefixed request settings. The main correction is right, but the same disk-options table still contains another dead key, so the documentation is not yet fully aligned with the code.

PR Metadata

The Documentation category matches the actual change. A changelog entry is not required for this category, so leaving ... is acceptable here.

Findings

⚠️ Majors

  • [docs/concepts/features/configuration/server-config/storing-data.mdx:364] The "disk option names match the parser" contract is still incomplete: S3Settings::loadFromConfigForObjectStorage ignores read_only and overrides the disk flag only from config_prefix + ".readonly" (src/IO/S3Settings.cpp:51). That means the table this PR touches still tells users to set a no-op key, and a copied configuration can leave an S3 disk writable when the operator expected read-only semantics. Suggested fix: rename that row to readonly so the table is fully consistent with the live loader.
Final Verdict

Changes requested.

LLVM Coverage Report

Measured on commit 4bf00b9.

Metric Baseline Current Δ
Lines 88.90% 88.90% +0.00%
Functions 91.80% 91.80% +0.00%
Branches 81.30% 81.30% +0.00%

Changed lines: Changed C/C++ lines covered: 8/8 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-documentation Documentation PRs for the specific code PR label Sep 9, 2026
| `request_timeout_ms` | Request timeout in milliseconds. | `5000` (5 seconds) |
| `retry_attempts` | Number of retry attempts for failed requests. | `10` |
| `single_read_retries` | Number of retry attempts for connection drops during read. | `4` |
| `s3_retry_attempts` | Number of retry attempts for failed requests. | `500` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This table is still not fully aligned with the parser: S3Settings::loadFromConfigForObjectStorage overwrites the disk read-only flag only from config_prefix + ".readonly" (src/IO/S3Settings.cpp:51), so the read_only spelling that remains lower in this same table is still a dead option. Since this PR is fixing dead disk config names, can we rename that row to readonly too? Otherwise readers can copy a config that leaves the disk writable.

@clickhouse-gh clickhouse-gh Bot added the comp-documentation Documentation (docs, examples, READMEs). label Sep 9, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 4bf00b9d5 with master 602ce8d11 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

7 translation units recompiled, 16 s compile time in total, 7 of them have a recent master baseline.

Job report

@Blargian Blargian self-assigned this Sep 9, 2026
@Blargian
Blargian enabled auto-merge September 9, 2026 08:35
@alexey-milovidov

Copy link
Copy Markdown
Member Author

The one red check, AST fuzzer (amd_release, oracle), is an oracle false positive unrelated to this change: it flags SELECT arrayMap(generateUUIDv4, [2147483648, NULL, 2147483646]) FROM test_table__fuzz_0 as a optimize_trivial_count_query mismatch, and that query's result is random by construction. This pull request only renames two options in the documentation and in the example embedded in registerStorageMergeTree.cpp.

@Blargian
Blargian disabled auto-merge September 9, 2026 17:09
@Blargian
Blargian added this pull request to the merge queue Sep 9, 2026
Merged via the queue into master with commit c0658e9 Sep 9, 2026
341 of 345 checks passed
@Blargian
Blargian deleted the s3-disk-retry-option-names-118444 branch September 9, 2026 20:31
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-documentation Documentation (docs, examples, READMEs). pr-documentation Documentation PRs for the specific code PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

3 participants