Skip to content

fix: Col Enum/LowCardinality/RawOf values retained after Reset - #1201

Open
earwin wants to merge 1 commit into
ClickHouse:mainfrom
rainsouthafrica:fix-column-values-retain
Open

earwin wants to merge 1 commit into
ClickHouse:mainfrom
rainsouthafrica:fix-column-values-retain

Conversation

@earwin

@earwin earwin commented Sep 18, 2026

Copy link
Copy Markdown

Summary

Reset() of ColEnum, ColLowCardinality, ColRawOf truncates value buffers without clearing them. This retains references to value strings, which can in turn retain references to larger buffers these strings were cut out from.

I'm now running a clear() on buffers that zeroes out the references, before truncating them.

Saves me a few hundred MBs of RAM in some ingestor runs.

@earwin
earwin force-pushed the fix-column-values-retain branch from 3ec4859 to c4b2c54 Compare September 18, 2026 16:08
…set()

Reset() of ColEnum, ColLowCardinality, ColRawOf truncates value
buffers without clearing them, retaining references to potentially
large blocks of text. This adds a clear() before truncate.
@earwin
earwin force-pushed the fix-column-values-retain branch from c4b2c54 to 3e1bbea Compare September 18, 2026 16:10
@earwin

earwin commented Oct 15, 2026

Copy link
Copy Markdown
Author

Sorry for bumping this, @kavirajk @chersner your thoughts?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant