[ https://issues.apache.org/jira/browse/CASSANDRA-13789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16181853#comment-16181853 ]
Stefania commented on CASSANDRA-13789: -------------------------------------- This [change|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/transport/CBUtil.java#L449] in {{CBUtil.writeValue()}} is a bit dangerous: {{writeValue()}} does not modify the source buffer, except it does modify it temporarily and in a thread unsafe way, with no documentation. If two threads ever wrote the same source buffer in parallel, maybe a buffer coming from memtables, this code would introduce a bug that would be very tedious to debug. > Reduce memory copies and object creations when acting on ByteBufs > ------------------------------------------------------------------ > > Key: CASSANDRA-13789 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13789 > Project: Cassandra > Issue Type: Improvement > Reporter: Norman Maurer > Assignee: Norman Maurer > Fix For: 4.0 > > Attachments: > 0001-CBUtil.sizeOfLongString-encodes-String-to-byte-to-ca.patch, > 0001-Reduce-memory-copies-and-object-creations-when-actin.patch > > > There are multiple "low-hanging-fruits" when it comes to reduce memory copies > and object allocations when acting on ByteBufs. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org