Skip to content

connectionId() is not deterministic - #92174

Merged
alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
azat:connectionId-determinstic
Dec 15, 2025
Merged

alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
azat:connectionId-determinstic

Conversation

@azat

@azat azat commented Dec 15, 2025 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Long term - isDeterministic/isDeterministicInScopeOfQuery should be pure virtual

@clickhouse-gh

clickhouse-gh Bot commented Dec 15, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [c1a20e0]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_tsan, 4/6) failure
test_restore_db_replica/test.py::test_query_after_restore_db_replica[rename table-with exists table-with restart] FAIL cidb, issue ISSUE EXISTS
BuzzHouse (amd_debug) failure
Logical error: 'Inconsistent AST formatting in Function_arrayElement: the query: FAIL cidb, issue ISSUE EXISTS

@azat
azat force-pushed the connectionId-determinstic branch from 93ef3f9 to c1a20e0 Compare December 15, 2025 16:06
@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Dec 15, 2025
@clickgapai

Copy link
Copy Markdown
Contributor

Hi @azat @alexey-milovidov — while reviewing this PR I found the following:

Happy to discuss — close anything that's wrong or already addressed.

Krishnachaitanyakc added a commit to Krishnachaitanyakc/ClickHouse that referenced this pull request Apr 2, 2026
`getClientHTTPHeader` reads per-connection HTTP headers, so its result
can differ between connections with the same arguments. Without the
`isDeterministic()=false` override, the query cache incorrectly caches
results of queries using this function, returning stale header values
on subsequent requests.

This is the same class of bug that was fixed for `connectionId` in
PR ClickHouse#92174.

Closes ClickHouse#101120
@clickgapai

Copy link
Copy Markdown
Contributor

Apologies for the duplicate notification — we had a race condition in our notification system where multiple processes posted simultaneously. The duplicate has been removed and we've added a strict 3-layer dedup guard (DB lock + immediate key + GitHub comment check) to ensure this cannot happen again.

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

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog 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