[ 
https://issues.apache.org/jira/browse/CASSANDRA-9738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14735326#comment-14735326
 ] 

Ariel Weisberg commented on CASSANDRA-9738:
-------------------------------------------


* [This line could just be 
instanceof?|https://github.com/apache/cassandra/compare/cassandra-3.0...snazy:9738-key-cache-ohc#diff-9b961593e363ad6a553e5af1ff1663b1R164]
* [Same 
here?|https://github.com/apache/cassandra/compare/cassandra-3.0...snazy:9738-key-cache-ohc#diff-9b961593e363ad6a553e5af1ff1663b1R544]
* I think we may want to consider not closing streams that wrap fixed buffers. 
The close operation does nothing, it throws an exception, and all that is going 
to do is generate useless instructions and prevent optimization. Maybe as a 
separate ticket we should go back and look for things that do that.
* DataInputBuffer doesn't have an efficient skip method. The skip method 
implementation in super classes expects that it is wrapping a channel or stream 
and skipping requires reading. For a fixed ByteBuffer there is no need to 
allocate or copy memory. MemoryInputStream has the same issue in that it could 
be efficient but isn't. Maybe they should have a common base class since they 
both wrap memory like things and can have memory (as opposed to stream or 
channel) specific implementations.
* [Dead 
code|https://github.com/apache/cassandra/compare/cassandra-3.0...snazy:9738-key-cache-ohc#diff-9b961593e363ad6a553e5af1ff1663b1R389]
* [I don't think you need to incorporate the buffer in the hash code. It's 
wasted cycles, position is sufficient? Not sure if we are using 
it.|https://github.com/apache/cassandra/compare/cassandra-3.0...snazy:9738-key-cache-ohc#diff-9b961593e363ad6a553e5af1ff1663b1R552}
* What's the difference between the ClusteringPrefix serializer in Serializers 
and ClusteringPrefix? Did you have to add the legacy support?

That's my reaction to the code. Working on tests and coverage now.

> Migrate key-cache to be fully off-heap
> --------------------------------------
>
>                 Key: CASSANDRA-9738
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9738
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>             Fix For: 3.0.0 rc1
>
>
> Key cache still uses a concurrent map on-heap. This could go to off-heap and 
> feels doable now after CASSANDRA-8099.
> Evaluation should be done in advance based on a POC to prove that pure 
> off-heap counter cache buys a performance and/or gc-pressure improvement.
> In theory, elimination of on-heap management of the map should buy us some 
> benefit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to