Skip to content

[CASSANDRA-21528] Avoid Kind.values() allocation when deserializing range tombstone markers#4952

Open
koo-taejin wants to merge 2 commits into
apache:trunkfrom
koo-taejin:CASSANDRA-21528-trunk
Open

[CASSANDRA-21528] Avoid Kind.values() allocation when deserializing range tombstone markers#4952
koo-taejin wants to merge 2 commits into
apache:trunkfrom
koo-taejin:CASSANDRA-21528-trunk

Conversation

@koo-taejin

@koo-taejin koo-taejin commented Jul 21, 2026

Copy link
Copy Markdown

ClusteringPrefix.Kind.values() creates a new array on every call. This happens when Cassandra deserializes range tombstone markers.

I found this while using Temporal with Cassandra. Temporal uses many range deletes. In this workload, this array allocation was about 3% of the total memory allocations. This code also used noticeable CPU time.
Cache the values array to avoid this repeated work.

Thanks. :)

patch by koo.taejin; reviewed by for CASSANDRA-21528

The Cassandra Jira

@koo-taejin koo-taejin changed the title [CASSANDRA-21528] Avoid Kind.values() allocation when deserializing r… [CASSANDRA-21528] Avoid Kind.values() allocation when deserializing range tombstone markers Jul 21, 2026
@smiklosovic
smiklosovic self-requested a review July 24, 2026 09:05
…alization to avoid per-read array allocation
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.

2 participants