Skip to content

Correct no-random-settings rationale in 04103_user_network_bandwidth_throttler - #106947

Closed
tiandiwonder wants to merge 1 commit into
ClickHouse:masterfrom
tiandiwonder:fix-04103-throttler-no-random-settings-comment
Closed

tiandiwonder wants to merge 1 commit into
ClickHouse:masterfrom
tiandiwonder:fix-04103-throttler-no-random-settings-comment

Conversation

@tiandiwonder

Copy link
Copy Markdown
Contributor

Follow-up to #103586. Corrects the no-random-settings rationale comment in 04103_user_network_bandwidth_throttler — it attributed the flakiness specifically to S3 prefetch, but as @azat pointed out in the review thread, the test fails with prefetching enabled too, so prefetch was not the cause.

The real fragility was the throttle limit sitting just below the natural S3 read rate, which has since been addressed by lowering the limit to 200 KB/s (well under the natural rate). This change only rewords the stale comment to say that various randomized settings perturb read throughput and that the conservative limit is the primary robustness. The no-random-settings tag is kept and test behavior is unchanged.

(Whether the tag is now redundant given the 200 KB/s limit could not be determined from CI history, since the two mitigations have only ever coexisted on master; this PR deliberately keeps the tag.)

Changelog category (leave one):

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

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

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

…throttler

The `no-random-settings` comment attributed the flakiness specifically to S3
prefetch, but the test fails with prefetch enabled too (per @azat); the real
fragility was the throttle limit sitting close to the natural S3 read rate,
since addressed by lowering the limit to 200 KB/s. Reword the comment to state
that various randomized settings perturb read throughput and that the
conservative limit is the primary robustness. Comment only; the tag is kept and
test behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@azat azat self-assigned this Jun 10, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [d28ff43]

Summary: ❌

job_name test_name status info comment
Stateless tests (arm_asan_ubsan, azure, parallel) FAIL
02477_single_value_data_string_regression FAIL cidb
Stress test (arm_debug) FAIL
Received signal 6 (internal) (STID: 7594-416d) FAIL cidb

AI Review

Summary

This PR rewords the no-random-settings rationale in tests/queries/0_stateless/04103_user_network_bandwidth_throttler.sh to remove the stale prefetch-specific explanation while keeping test behavior unchanged. I did not find any correctness, metadata, or documentation issue that warrants an inline review comment.

Missing context / blind spots
  • ⚠️ I could not validate the current Praktika CI report through .claude/tools/fetch_ci_report.js because its internal gh api call was rejected by GitHub token policy (HTTP 403). A successful CI report fetch or direct CI result would close this gap.
Final Verdict

✅ No blocking or major findings. No inline comments posted.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jun 10, 2026
@tiandiwonder
tiandiwonder requested a review from Copilot June 10, 2026 11:02
@tiandiwonder tiandiwonder added the can be tested Allows running workflows for external contributors label Jun 10, 2026

Copilot AI left a comment

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.

Pull request overview

This PR updates the rationale comment for the no-random-settings tag in the stateless test 04103_user_network_bandwidth_throttler, correcting the previous explanation that attributed flakiness specifically to S3 prefetch being disabled. It clarifies that various randomized settings can perturb S3 read throughput, and that the conservative 200 KB/s throttle limit is the primary robustness mechanism.

Changes:

  • Reword no-random-settings comment to describe throughput variability from multiple randomized settings, not just prefetch.
  • Explicitly documents that the conservative throttle limit is the main factor ensuring deterministic throttler sleeping/assertions.

@clickhouse-gh

clickhouse-gh Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.70% 84.60% -0.10%
Functions 92.30% 92.30% +0.00%
Branches 77.30% 77.20% -0.10%

Changed lines: No C/C++ source files changed — skipping uncovered code analysis.

Newly covered by added/modified tests: 335 line(s), 12 function(s) across 121 file(s) · Details

Top files
  • src/Storages/StorageReplicatedMergeTree.cpp: 30 line(s)
  • src/Storages/ObjectStorageQueue/ObjectStorageQueueSource.cpp: 14 line(s)
  • src/Functions/FunctionGenerateRandomStructure.cpp: 12 line(s)
  • src/Server/DistributedQuery/StreamingExchangeSink.cpp: 10 line(s), 1 function(s)
  • src/IO/S3/copyS3File.cpp: 10 line(s)

Full report

# no-random-settings: various randomized settings (read-buffer sizes, prefetch, thread counts,
# etc.) perturb the S3 read throughput; pinning them keeps the read rate stable relative to the
# throttle limit so the throttler reliably sleeps and the assertion is deterministic. The primary
# robustness comes from the conservative throttle limit below (well under the natural read rate).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm still wonder, which setting causing instability?

@azat

azat commented Jul 8, 2026

Copy link
Copy Markdown
Member

Ok, anyway here is a proper fix - #106680
Let's close this for now since randomization should not affect the test anyway

@azat azat closed this Jul 8, 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-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants