Skip to content

Fix 04603_quota_zero_interval breaking parallel and stress runs - #110954

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix/04603-quota-zero-interval-stress
Jul 19, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix/04603-quota-zero-interval-stress

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jul 18, 2026 •

Copy link
Copy Markdown
Member

Related: #110846
Related: #106215

The stateless test 04603_quota_zero_interval created a query quota with TO default. A quota is a server-global entity, and in stress and parallel runs all stateless tests execute concurrently against the same server as the default user. The quota on default was therefore consumed by every concurrent query, exhausted its limit (MAX queries = 1000 per hour), and made the server reject subsequent queries with QUOTA_EXCEEDED — eventually taking the whole server down (Server is not responding).

This surfaced as a Stress test (amd_msan) failure on PR #106215 after that PR merged the test in from master:

Quota for user `default` for 3600s has been exceeded: queries = 3116/1 ...
Name of quota template: `quota_zero_test_...`. (QUOTA_EXCEEDED)
...
Server is not responding. Cannot execute 'SELECT 1' query.

The interval is validated at CREATE time in InterpreterCreateQuotaQuery, independent of the TO assignment, so the quota does not need to be assigned to anyone for the test to exercise the BAD_ARGUMENTS rejection. Dropping the TO default clause makes the test stop touching the shared default user, so it is safe under stress and parallel execution. The reference output (BAD_ARGUMENTS / BAD_ARGUMENTS / ok) is unchanged.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106215&sha=0b2a2b671abe9df2dae40253fb8fafacaf699575&name_0=PR&name_1=Stress%20test%20%28amd_msan%29

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):

...

Version info

  • Merged into: 26.7.1.1178 (included in 26.7 and later)

The test created a query quota with `TO default`. A quota is a server-global
entity, and in stress and parallel runs all stateless tests execute
concurrently against the same server as the `default` user, so the quota on
`default` was consumed by every concurrent query, exhausted its limit, and made
the server reject subsequent queries with `QUOTA_EXCEEDED` — eventually taking
the whole server down (`Server is not responding`).

The interval is validated at CREATE time in `InterpreterCreateQuotaQuery`,
independent of the `TO` assignment, so the quota does not need to be assigned to
anyone for the test to exercise the `BAD_ARGUMENTS` rejection. Drop the
`TO default` clause so the test no longer touches the shared `default` user; the
reference output (`BAD_ARGUMENTS` / `BAD_ARGUMENTS` / `ok`) is unchanged.

Surfaced on the `Stress test (amd_msan)` job of
#106215
CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106215&sha=0b2a2b671abe9df2dae40253fb8fafacaf699575&name_0=PR&name_1=Stress%20test%20%28amd_msan%29

Caused by: #110846

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [07dc0b2]

Summary: ✅


AI Review

Summary

This PR removes the TO default assignment from 04603_quota_zero_interval so the regression test no longer attaches a global quota to the shared default user during stress and parallel stateless runs. I checked the current diff, the existing quota validation path in InterpreterCreateQuotaQuery, the original regression PR context, and the prior PR discussion; the change preserves the test's actual contract that non-positive quota intervals must be rejected at CREATE QUOTA time while eliminating the cross-test interference that was taking the server down under stress.

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 19, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 19, 2026
Merged via the queue into master with commit 219a69b Jul 19, 2026
179 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix/04603-quota-zero-interval-stress branch July 19, 2026 03:14
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 19, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…zero-interval-stress

Fix `04603_quota_zero_interval` breaking parallel and stress runs
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