Skip to content

[CASSANDRA-21351][trunk] Reduce memory allocations in SelectStatement.getQuery#4785

Closed
netudima wants to merge 1 commit into
apache:trunkfrom
netudima:CASSANDRA-21351-trunk
Closed

[CASSANDRA-21351][trunk] Reduce memory allocations in SelectStatement.getQuery#4785
netudima wants to merge 1 commit into
apache:trunkfrom
netudima:CASSANDRA-21351-trunk

Conversation

@netudima
Copy link
Copy Markdown
Contributor

@netudima netudima commented May 4, 2026

  • SinglePartitionReadCommand.Group#create - typical single partition select, use singletonList instead of ArrayList + Object[]
  • SelectStatement#getSliceCommands - remove unnecessary cloning of partition key, it is a part of a very old patch, now we copy all values from Netty buffers
  • SelectStatement#getSliceCommands - typical single partition select, use singletonList instead of ArrayList + Object[] SinglePartitionReadQuery.Group#maybeValidateIndex, avoid iterators for restrictionSet if a full partition is selected

patch by Dmitry Konstantinov; reviewed by TBD for CASSANDRA-21351

Comment thread src/java/org/apache/cassandra/cql3/restrictions/ClusteringColumnRestrictions.java Outdated
Comment thread src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
Copy link
Copy Markdown
Contributor

@frankgh frankgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 looks good!

@smiklosovic smiklosovic self-requested a review May 7, 2026 09:38
SinglePartitionReadCommand.Group#create - typical single partition select, use singletonList instead of ArrayList + Object[]
SelectStatement#getSliceCommands - remove unnessesary cloning of partition key, it is a part of a very old patch, now we copy all values from Netty buffers
SelectStatement#getSliceCommands - typical single partition select, use singletonList instead of ArrayList + Object[]
SinglePartitionReadQuery.Group#maybeValidateIndex, avoid iterators for restrictionSet if a full partition is selected

patch by Dmitry Konstantinov; reviewed by Francisco Guerrero, Stefan Miklosovic for CASSANDRA-21351
@netudima netudima force-pushed the CASSANDRA-21351-trunk branch from e8ac30d to 48bc6d5 Compare May 7, 2026 10:03
@netudima
Copy link
Copy Markdown
Contributor Author

netudima commented May 7, 2026

Merged as f06770f

@netudima netudima closed this May 7, 2026
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.

3 participants