You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Semb Wever (Jira)" <ji...@apache.org> on 2026/10/21 11:43:00 UTC
[jira] [Assigned] (CASSANDRA-21699) InMemoryTrie reads the row overhead property for its size limit
[ https://issues.apache.org/jira/browse/CASSANDRA-21699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Semb Wever reassigned CASSANDRA-21699:
----------------------------------------------
Assignee: Michael Semb Wever
> InMemoryTrie reads the row overhead property for its size limit
> ---------------------------------------------------------------
>
> Key: CASSANDRA-21699
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21699
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Local/Memtable
> Reporter: Michael Semb Wever
> Assignee: Michael Semb Wever
> Priority: Normal
> Fix For: 5.0.x, 6.0.x, 7.x
>
> Attachments: ci_summary_thelastpickle_mck-CASSANDRA-21699-5.0_29.html, ci_summary_thelastpickle_mck-CASSANDRA-21699-6.0_71.html, ci_summary_thelastpickle_mck-CASSANDRA-21699-trunk_36.html, results_details_thelastpickle_mck-CASSANDRA-21699-5.0_29.tar.xz, results_details_thelastpickle_mck-CASSANDRA-21699-6.0_71.tar.xz, results_details_thelastpickle_mck-CASSANDRA-21699-trunk_36.tar.xz
>
>
> {{InMemoryTrie}} reads {{cassandra.memtable.row_overhead_size}} for its allocated size threshold:
> {code:java}
> int limitInMB = CassandraRelevantProperties.MEMTABLE_OVERHEAD_SIZE.getInt(2048 * 10 / 11);
> if (limitInMB < 1 || limitInMB > 2047)
> throw new AssertionError(...);
> {code}
> That property is a byte count that {{SkipListMemtable}} reads for its per-row overhead, and the trie reads the same value as a megabyte count, so one property drives two unrelated settings. An operator who tunes the row overhead moves the trie threshold as well, and a row overhead above 2047 makes the class initialiser throw an {{AssertionError}}.
> {{SimulationRunner}} shows the effect in the tree: it sets the property to 100 for the row overhead, which cuts the trie threshold from 1861MB to 100MB, so a simulated trie memtable reports that it reached its limit after a twentieth of the memory the default allows.
> {{CassandraRelevantProperties}} already declares {{MEMTABLE_TRIE_SIZE_LIMIT}} ({{cassandra.trie_size_limit_mb}}), and no code reads it. The patch reads that property instead, and names it in the range message. The default threshold does not change. The static block becomes a package-private method, so a test can read the threshold more than once.
> Patch: [mck/CASSANDRA-21699/5.0|https://github.com/thelastpickle/cassandra/tree/mck/CASSANDRA-21699/5.0]
> Provenance: [eb272c8458|https://github.com/datastax/cassandra/commit/eb272c8458390d6e3bbbb557c62cf68b9967f04c] by [~mike_tr_adamson]. That commit makes the same property change and also lowers the default threshold to 1GB, which this patch leaves out, because the default belongs to a separate discussion. That commit carries no test; this patch adds one.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org