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

Paulo Motta commented on CASSANDRA-10341:
-----------------------------------------

Attached 2.1, 2.2 and 3.0 patches with solution based on [~yukim]'s suggestion.

Basic idea is to perform row cache invalidation based on received sstable 
ranges after a stream receive task is finished. For this, I added new method 
{{ColumnFamilyStore.invalidateRowCacheInclusiveRanges(Collection<Bounds<Token>>)}},
 which is called on {{StreamReceiveTask.OnCompletionRunnable.run()}} for all 
received sstable ranges. Added unit test for 
{{invalidateRowCacheInclusiveRanges}} on {{RowCacheTest}}.

Tests will be available on:
* [2.1 
dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10341-2.1-v2-dtest/]
* [2.1 
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10341-2.1-v2-testall/]
* [2.2 
dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10341-2.2-v2-dtest/]
* [2.2 
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10341-2.2-v2-testall/]
* [3.0 
dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10341-3.0-dtest/]
* [3.0 
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10341-3.0-testall/]
* [trunk 
dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10341-trunk-dtest/]
* [trunk 
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-10341-trunk-testall/]

Would you mind reviewing [~yukim]? Thanks!

> Streaming does not guarantee cache invalidation
> -----------------------------------------------
>
>                 Key: CASSANDRA-10341
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10341
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Benedict
>            Assignee: Paulo Motta
>
> Looking at the code, we attempt to invalidate the row cache for any rows we 
> receive via streaming, however we invalidate them immediately, before the new 
> data is available. So, if it is requested (which is likely if it is "hot") in 
> the interval, it will be re-cached and not invalidated.



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

Reply via email to