Skip to content

La Casa Del Dolor: keep S3 upload parts at least 5 MiB - #131475

Merged
alexey-milovidov merged 1 commit into
masterfrom
casa-del-dolor-s3-min-part-size
Nov 14, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
casa-del-dolor-s3-min-part-size

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

s3_min_upload_part_size was randomized down to 1 KiB and s3_strict_upload_part_size to any size below 16 MiB. S3 and MinIO reject a multipart upload whose non-final parts are under 5 MiB (EntityTooSmall), so no file above s3_max_single_part_upload_size could be written on such a disk. With database_disk on that disk, the system.metric_log table metadata (650 KB) failed to be written on every flush, each attempt taking 23 s at s3_max_put_rps = 22; the final flush at shutdown outlasted the 30 s wait and the server was killed ("Server shutdown"). The server was not hung: its stacks show the throttled UploadPart requests of the metadata write.

Both settings now stay at least 5 MiB (the strict size is either 0 or at least 5 MiB). Azure settings are unchanged, as Azure has no such minimum.

La Casa Del Dolor (amd_debug), master, 2026-11-13: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=6e606942f3e5eeb31f97ecf120fc61032cd5408e&name_0=MasterCI&name_1=La%20Casa%20Del%20Dolor%20%28amd_debug%29

Changelog category (leave one):

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

🤖 Generated with Claude Code


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

Version info

  • Merged into: 26.11.1.2279-master (included in 26.11 and later)

`s3_min_upload_part_size` was randomized down to 1 KiB and
`s3_strict_upload_part_size` to any size below 16 MiB. S3 and MinIO
reject a multipart upload with a non-final part under 5 MiB
(`EntityTooSmall`), so no file above `s3_max_single_part_upload_size`
could be written on such a disk. With `database_disk` on it, the
`system.metric_log` table metadata (650 KB) failed to be written on
every flush, each attempt taking 23 s at `s3_max_put_rps = 22`, and the
final flush outlasted the 30 s shutdown wait: "Server shutdown" failure.

Keep both at least 5 MiB (strict size: either 0 or at least 5 MiB).

La Casa Del Dolor (amd_debug), master, 2026-11-13:
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=6e606942f3e5eeb31f97ecf120fc61032cd5408e&name_0=MasterCI&name_1=La%20Casa%20Del%20Dolor%20%28amd_debug%29

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [35541ad]

Summary: ✅


AI Review

Summary

This CI-only change keeps s3_min_upload_part_size at least 5 MiB and s3_strict_upload_part_size either disabled or at least 5 MiB, consistent with S3's multipart limits. The linked failure artifacts support the diagnosis of invalid multipart sizes delaying shutdown. Checks passed for 64 boundary and omitted-setting combinations and 100,000 seeded samples; the base revision reproduced invalid 1 KiB values for both settings. No actionable findings.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-ci comp-testing Test content only (no production code). labels Nov 13, 2026

@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.

We are using SeaweedFS, not Minio.

@alexey-milovidov alexey-milovidov self-assigned this Nov 14, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 14, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member Author

@groeneai if this is true, send a follow-up PR correcting the comments; if this isn't true, send a PR migrating la casa to SeaweedFS.

Merged via the queue into master with commit f3bfabe Nov 14, 2026
208 checks passed
@alexey-milovidov
alexey-milovidov deleted the casa-del-dolor-s3-min-part-size branch November 14, 2026 02:15
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 14, 2026
@groeneai

Copy link
Copy Markdown
Collaborator

Acknowledged. I checked, and La Casa Del Dolor still runs MinIO, not SeaweedFS: ci/jobs/lacasadeldolor_job.py never passes --without-minio, so dolor.py starts every node with with_minio=True, and the integration harness then launches minio1 from tests/integration/compose/docker_compose_minio.yml (image clickhouse/minio-minio:RELEASE.2026-08-04T00-00-00Z, the mirrored pgsty MinIO fork). SeaweedFS replaced MinIO only in stateless CI (#113828). I'm preparing a PR migrating La Casa to SeaweedFS and will post the link here.

@groeneai

Copy link
Copy Markdown
Collaborator

I opened #131564: La Casa Del Dolor now runs its S3 server on SeaweedFS (chrislusf/seaweedfs:4.48, as in stateless) through an opt-in s3_server="seaweedfs" in the integration harness; other integration tests keep MinIO. The 5 MiB comment from this PR now names SeaweedFS, which rejects smaller parts with the same EntityTooSmall.

omar12eladawy pushed a commit to omar12eladawy/ClickHouse that referenced this pull request Nov 17, 2026
La Casa got its S3 server from the integration harness, which had exactly
one implementation behind `with_minio`: `setup_minio_cmd` always started
`docker_compose_minio.yml`, `minio_host` was the literal "minio1",
`wait_minio_to_start` always looked up the MinIO redirect proxy, and the
instance compose depended on "minio1". So `dolor.py` always ran MinIO,
while stateless CI moved to SeaweedFS in ClickHouse#113828.

`ClickHouseCluster` now takes `s3_server` ("minio" by default, or
"seaweedfs"). With "seaweedfs", `with_minio` starts the new
`docker_compose_seaweedfs.yml`: one `seaweedfs1` container running
`chrislusf/seaweedfs:4.48` with the flags of
`ci/jobs/scripts/functional_tests/setup_seaweedfs.sh`, serving S3 on the
MinIO port with the MinIO credentials. Every `minio_*` attribute, the
bucket setup, `minio_client` and the `base_minio_cmd` restart hook keep
working, so the disks, `dqtmp` and the `s3` named collection La Casa
generates point at `seaweedfs1` without changes to `properties.py`.
`wait_minio_to_start` also waits for one successful write, because a cold
SeaweedFS rejects writes until it has allocated its first volume, and
skips the proxy lookup there.

`-volume.preStopSeconds=1` drops the 10 s wait a volume server makes
before stopping, which only matters in a multi-node SeaweedFS cluster.
The filer still waits up to 15 s for its open gRPC streams on SIGTERM
(`weed/command/filer.go`, not configurable for `weed server`), so a
graceful stop takes about 17 s: `stop_grace_period` is 30 s, so the
"manual shutdown" of La Casa's S3 integration is not a SIGKILL.

`dolor.py` passes "seaweedfs" unless Spark or an Iceberg REST, Glue or
Hive catalog is requested: those shared services are set up against
`minio1`, and the CI job enables none of them.

The comment from ClickHouse#131475 now says SeaweedFS: it rejects
`CompleteMultipartUpload` of parts below 5 MiB with `EntityTooSmall`,
the same as MinIO (measured). The FIXME in `sparkserver.py` pointed at a
script that no longer exists; it now names `setup_seaweedfs.sh`, whose
endpoint, bucket and credentials the values below it are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omar12eladawy pushed a commit to omar12eladawy/ClickHouse that referenced this pull request Nov 17, 2026
An S3 restart in `dolor.py` used to end as soon as `docker compose start`
returned. MinIO served again under a second later; SeaweedFS serves an
object written before the stop only 14-22 s later (master raft election,
then filer and S3 start). When the run's time limit falls in that window,
the final teardown stops every server while their S3 disks and S3
`database_disk` point at a server that does not serve yet, and their
retried shutdown flushes are the `Server shutdown` failure that ClickHouse#131475
fixed. With the job's flags seed 2 hits it: the teardown began 0.09 s
after the start of `seaweedfs1`.

Before stopping or killing the S3 server, `dolor.py` now writes
`dolor/restart_probe`; after starting it, it waits (at most 60 s) until
the server reads that object and accepts a write. Measured: 14.0-18.1 s
on SeaweedFS.

The harness also rejects `s3_server="seaweedfs"` together with an
Iceberg REST, Glue or Hive catalog (their compose files and configs
hard-code `minio1`) or with `minio_certs_dir` (the SeaweedFS compose
serves plain HTTP), instead of starting a cluster that fails later.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-testing Test content only (no production code). 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.

3 participants