Avoid possible crash in Parquet with metadata cache enabled#99231
Merged
azat merged 2 commits intoClickHouse:masterfrom Mar 11, 2026
Merged
Avoid possible crash in Parquet with metadata cache enabled#99231azat merged 2 commits intoClickHouse:masterfrom
azat merged 2 commits intoClickHouse:masterfrom
Conversation
Contributor
|
Workflow [PR], commit [423ed0f] Summary: ✅ AI Review1) SummaryThis PR fixes a real correctness issue in background Parquet reads by switching metadata-cache access from 2) Missing context (if any)
3) Findings (by severity)Blockers
Majors
The PR looks good. 4) Tests & Evidence
5) ClickHouse Compliance Checklist (Yes/No + short note)
6) Performance & Safety Notes
7) User-Lens Review
8) Final Verdict
|
grantholly-clickhouse
approved these changes
Mar 10, 2026
Member
alexey-milovidov
left a comment
There was a problem hiding this comment.
No tests, no explanation, no link to CI?
Co-Authored-By: Claude <[email protected]>
Member
Author
|
Contributor
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 100.00% (21/21) |
Merged
via the queue into
ClickHouse:master
with commit Mar 11, 2026
1d77df5
475 of 482 checks passed
Member
|
Thanks for the test and the explanation! |
arthurpassos
pushed a commit
to Altinity/ClickHouse
that referenced
this pull request
Mar 25, 2026
Avoid crash possible crash in Parquet with metadata cache enabled
27 tasks
zvonand
added a commit
to Altinity/ClickHouse
that referenced
this pull request
Mar 31, 2026
…data_cache_261 Antalya 26.1 Backport of ClickHouse#98140, ClickHouse#99230, ClickHouse#99231 and ClickHouse#96545 - Parquet metadata cache (upstream impl) and arrow library version bump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Note
Medium Risk
Changes
FormatFactory’s metadata-aware random-access input creator signature to pass an explicitContext, which can affect any format registered with this creator and cause build/runtime issues if not updated. Behavior change is targeted but touches format creation plumbing used by background ingestion paths (e.g.,S3Queue).Overview
Fixes a crash when reading Parquet with metadata cache from background threads that don’t have a
CurrentThreadquery context (e.g.,S3Queue).FormatFactorynow passes theContextintoRandomAccessInputCreatorWithMetadata, and Parquet’s metadata-aware creator switches fromCurrentThread::getQueryContext()->getParquetMetadataCache()tocontext->getParquetMetadataCache().Adds a stateless regression test (
04034_parquet_v3_metadata_cache_no_query_context) that exercisesS3Queuereading Parquet from S3 with native reader v3 + metadata cache enabled.Written by Cursor Bugbot for commit 423ed0f. This will update automatically on new commits. Configure here.