Skip to content

Check total memory limit overflow earlier. - #95003

Merged
KochetovNicolai merged 19 commits into
masterfrom
check-memory-limit-earlier
Feb 19, 2026
Merged

KochetovNicolai merged 19 commits into
masterfrom
check-memory-limit-earlier

Conversation

@KochetovNicolai

@KochetovNicolai KochetovNicolai commented Jan 23, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

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

Check for the total memory limit before the user authentication and throw (total) memory limit exceeded if the total limit is more than allowed.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.2.1.937

@clickhouse-gh

clickhouse-gh Bot commented Jan 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ad9d023]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_debug, AsyncInsert, s3 storage, sequential) failure
00991_system_parts_race_condition_long FAIL cidb IGNORED
Logical error: Column A has rows count B according to size in memory and size of single value, but data part C has D rows (STID: 4899-72c4) FAIL cidb, issue ISSUE CREATED
Integration tests (amd_asan, targeted) error IGNORED

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Jan 23, 2026
Comment thread src/Server/TCPHandler.cpp Resolved
@KochetovNicolai
KochetovNicolai marked this pull request as ready for review January 27, 2026 19:17
@azat azat self-assigned this Jan 27, 2026

@azat azat left a comment

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.

Also the question I have - does it worth to introduce SYSTEM ALLOCATE UNTRACKED MEMORY for tests?

Comment thread src/Common/UntrackedMemoryHolder.h Resolved
Comment thread src/Interpreters/Context.cpp Resolved
Comment thread src/Common/UntrackedMemoryHolder.h Resolved
@KochetovNicolai

Copy link
Copy Markdown
Member Author

Also the question I have - does it worth to introduce SYSTEM ALLOCATE UNTRACKED MEMORY for tests?

Don't know.
I want to have a test so that the check is not removed, apparently.
I don't know a simple way to overallocate memory for a server. Ideally, this should not happen, so I would need to cheat.
So I found it simpler to add this system command than not to add it.

Comment thread programs/server/Server.cpp Resolved
Comment thread src/Interpreters/Context.cpp Resolved
@KochetovNicolai
KochetovNicolai added this pull request to the merge queue Feb 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 17, 2026
@KochetovNicolai
KochetovNicolai added this pull request to the merge queue Feb 19, 2026
Merged via the queue into master with commit 443bf80 Feb 19, 2026
144 of 147 checks passed
@KochetovNicolai
KochetovNicolai deleted the check-memory-limit-earlier branch February 19, 2026 15:48
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 19, 2026
@qoega

qoega commented Apr 1, 2026

Copy link
Copy Markdown
Member

at which level we will cancel query? is there special error code for this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements 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.

4 participants