[
https://issues.apache.org/jira/browse/CASSANDRA-20166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18042300#comment-18042300
]
Dmitry Konstantinov commented on CASSANDRA-20166:
-------------------------------------------------
CI test results:
* [https://pre-ci.cassandra.apache.org/job/cassandra/215/#showFailuresLink]
* [^CASSANDRA-20166-trunk_ci_summary.htm]
* [^CASSANDRA-20166-trunk_results_details.tar.xz]
Test failures are not related to the current change and observed for other
branches/trunk:
Tests / dtest jdk17 14/64 /
dtest.bootstrap_test.TestBootstrap.test_killed_wiped_node_cannot_join
Tests / dtest-latest jdk11 15/64 /
dtest-latest.bootstrap_test.TestBootstrap.test_decommissioned_wiped_node_can_join
Tests / test-latest jdk11 12/20 /
org.apache.cassandra.concurrent.InfiniteLoopExecutorTest.testShutdownNow-latest_jdk11_x86_64
Tests / test-latest jdk17 12/20 /
org.apache.cassandra.utils.SimpleBitSetSerializersTest.any-latest_jdk17_x86_64
Tests / dtest-latest jdk11 14/64 /
dtest-latest.bootstrap_test.TestBootstrap.test_killed_wiped_node_cannot_join
Tests / dtest-latest jdk17 14/64 /
dtest-latest.bootstrap_test.TestBootstrap.test_killed_wiped_node_cannot_join
Tests / dtest jdk11 21/64 /
dtest.materialized_views_test.TestMaterializedViewsConsistency.test_multi_partition_consistent_reads_after_write
Tests / dtest-latest jdk17 2/64 /
dtest-latest.bootstrap_test.TestBootstrap.test_read_from_bootstrapped_node
Tests / jvm-dtest jdk17 1/16 /
org.apache.cassandra.fuzz.topology.AccordTopologyMixupTest.test-_jdk17_x86_64
Tests / jvm-dtest jdk11 1/16 /
org.apache.cassandra.fuzz.topology.AccordTopologyMixupTest.test-_jdk11_x86_64
Tests / jvm-dtest jdk17 5/16 /
org.apache.cassandra.distributed.test.log.InProgressSequenceCoordinationTest.bootstrapProgressTest-_jdk17_x86_64
Tests / jvm-dtest jdk17 5/16 /
org.apache.cassandra.distributed.test.log.InProgressSequenceCoordinationTest.inProgressSequenceRetryTest-_jdk17_x86_64
Tests / jvm-dtest jdk11 14/16 /
org.apache.cassandra.distributed.test.cql3.PaxosV1MultiNodeTableWalkTest.test-_jdk11_x86_64
Tests / jvm-dtest jdk17 14/16 /
org.apache.cassandra.distributed.test.cql3.PaxosV1MultiNodeTableWalkTest.test-_jdk17_x86_64
Tests / jvm-dtest jdk11 15/16 /
org.apache.cassandra.distributed.test.cql3.PaxosV2MultiNodeTableWalkTest.test-_jdk11_x86_64
Tests / jvm-dtest jdk11 7/16 /
org.apache.cassandra.distributed.test.cql3.FullAccordInteropMultiNodeTableWalkTest.test-_jdk11_x86_64
Tests / jvm-dtest jdk17 5/16 /
junit.framework.TestSuite.org.apache.cassandra.distributed.test.accord.MigrationFromAccordWriteRaceTest-_jdk17_x86_64
Tests / jvm-dtest jdk17 15/16 /
org.apache.cassandra.fuzz.topology.AccordBootstrapTest.terminated
successfully-cassandra.testtag_IS_UNDEFINED
Tests / jvm-dtest jdk11 15/16 /
org.apache.cassandra.fuzz.topology.AccordBootstrapTest.terminated
successfully-cassandra.testtag_IS_UNDEFINED
Tests / simulator-dtest jdk11 /
org.apache.cassandra.simulator.test.ShortAccordSimulationTest.simulationTest-_jdk11_x86_64
Tests / simulator-dtest jdk11 /
org.apache.cassandra.simulator.test.ShortPaxosSimulationTest.selfReconcileTest-cassandra.testtag_IS_UNDEFINED
InfiniteLoopExecutorTest - is a rare failure but the changes are not related
to the logic + locally the test passes.
> Avoid ByteBuffer allocation during decoding of prepared CQL write requests
> --------------------------------------------------------------------------
>
> Key: CASSANDRA-20166
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20166
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: CQL/Interpreter
> Reporter: Dmitry Konstantinov
> Assignee: Dmitry Konstantinov
> Priority: Normal
> Fix For: 5.x
>
> Attachments: CASSANDRA-20166-trunk_ci_summary.htm,
> CASSANDRA-20166-trunk_results_details.tar.xz, async_profiler_alloc.png,
> image-2024-12-26-17-33-39-031.jpg, image-2024-12-26-17-33-39-031.png,
> image-2024-12-26-17-35-05-485.png
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> A lot of ByteBuffer objects are allocated when we decode CQL queries,
> frequently the space spent for such objects is large than the actual amount
> of data received.
> There was a similar optimization (use byte[] directly and wrap them into
> ArrayCell instead of BufferCell) done some time ago for the place where a
> Mutation object is deserializing during a Cassandra cross-node communication
> or reading from a disk: CASSANDRA-15393
> While a complete replacement of ByteBuffer with byte[] during CQL decoding
> step looks like a very complex task (ByteBuffer is a part of too many
> entities involved into CQL parsing) we can optimize 20% of logic to get 80%
> of benefit by focusing only on batch and modification statements when
> prepared statements are used and cell values are provided as bind variables.
> !image-2024-12-26-17-33-39-031.jpg|width=570!
> In case of 10-symbol String values I used for a test the wrapping ByteBuffer
> objects are costlier than inner byte[] with data:
>
> !image-2024-12-26-17-35-05-485.png|width=570!
> Async profiler (-e alloc) view:
> !async_profiler_alloc.png|width=570!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]