[
https://issues.apache.org/jira/browse/CASSANDRA-17298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877305#comment-17877305
]
Dmitry Konstantinov edited comment on CASSANDRA-17298 at 8/28/24 9:45 AM:
--------------------------------------------------------------------------
{quote}it's necessary because before the test we had reached about 2x
difference between the memtable's understanding of its on-heap size and what it
actually used.
{quote}
Yes, no doubts here - I looked though the history: CASSANDRA-16318 and
CASSANDRA-18125
{quote}I wonder if it we shouldn't backport most of that 5.0 patch so that we
start testing all allocation strategies in 4.x as well.
{quote}
Yes, I thought about it as well, just worried to not make the change too big. I
will backport testing of other allocation strategies to the MRs.
{quote}ll. Also, am I understanding correctly that there is also something
(EMPTY_LEAF?) that we are not tracking correctly in 5.0?
{quote}
No, as of now I have not found anything to fix in 5.0.
EMPTY_LEAF fix is here:
[https://github.com/apache/cassandra/commit/49e0c61107005b1a83799f7f1e6c0a855d159c29#diff-f937f7e20079a198fac440e91b60acac76125e75f55ea01da912f66581d5846e]
In future I have a plan to add (as a separate improvement ticket) more tests to
5.0 about changing of existing rows (the current tests are focused on measuring
of inserted elements and does not cover the adjustment cases when an existing
partition object is updated like row update or a row insert and then removal -
it is tricker to test due to slabs usage but this area may still have some
hidden issues).
was (Author: dnk):
{quote}
it's necessary because before the test we had reached about 2x difference
between the memtable's understanding of its on-heap size and what it actually
used.
{quote}
Yes, no doubts here - I looked though the history: CASSANDRA-16318 and
CASSANDRA-18125
{quote}I wonder if it we shouldn't backport most of that 5.0 patch so that we
start testing all allocation strategies in 4.x as well.
{quote}
Yes, I thought about it as well, just worried to not make the change too big. I
will backport testing of other allocation strategies to the MRs.
{quote}ll. Also, am I understanding correctly that there is also something
(EMPTY_LEAF?) that we are not tracking correctly in 5.0?
{quote}
No, as of now I have not found anything to fix in 5.0.
EMPTY_LEAF fix is here:
[https://github.com/apache/cassandra/commit/49e0c61107005b1a83799f7f1e6c0a855d159c29#diff-f937f7e20079a198fac440e91b60acac76125e75f55ea01da912f66581d5846e]
In future I have a plan to add (as a separate improvement ticket) more tests to
5.0 about changing of existing rows (the current tests are focused on measuring
of inserted elements and does not cover the adjustment cases when an existing
partition object is updated like row update or a row insert and then removal).
> Test Failure: org.apache.cassandra.cql3.MemtableSizeTest
> --------------------------------------------------------
>
> Key: CASSANDRA-17298
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17298
> Project: Cassandra
> Issue Type: Bug
> Components: Test/unit
> Reporter: Josh McKenzie
> Assignee: Dmitry Konstantinov
> Priority: Normal
> Fix For: 4.0.x, 4.1.x
>
> Attachments: analyzed_objects.svg, structure_example.svg
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> [https://ci-cassandra.apache.org/job/Cassandra-4.0/313/testReport/org.apache.cassandra.cql3/MemtableSizeTest/testTruncationReleasesLogSpace_2/]
> Failed 4 times in the last 30 runs. Flakiness: 27%, Stability: 86%
> Error Message
> Expected heap usage close to 49.930MiB, got 41.542MiB.
> {code}
> Stacktrace
> junit.framework.AssertionFailedError: Expected heap usage close to 49.930MiB,
> got 41.542MiB.
> at
> org.apache.cassandra.cql3.MemtableSizeTest.testSize(MemtableSizeTest.java:130)
> at org.apache.cassandra.Util.runCatchingAssertionError(Util.java:644)
> at org.apache.cassandra.Util.flakyTest(Util.java:669)
> at
> org.apache.cassandra.cql3.MemtableSizeTest.testTruncationReleasesLogSpace(MemtableSizeTest.java:61)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> {code}
> *UPDATE:* It was discovered that unit tests were running with
> memtable_allocation_type: offheap_objects when we ship C* with heap_buffers.
> So we changed that in CASSANDRA-19326, now we test with
> memtable_allocation_type: heap_buffers. As a result, this test now fails all
> the time on 4.0 and 4.1.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]