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

Sylvain Lebresne commented on CASSANDRA-2284:
---------------------------------------------

Truth is that, the sheer size of CFStore (over 2K line) annoys me. I think this 
prove CFStore has too much things in it and we messed up at encapsulation. So I 
tried to make DataTracker be about dealing with the memtables and sstables as 
much as possible. And being able to have View not leak from DataTracker sound 
like a proof that we do have some encapsulation there. I'm not claiming it's 
perfect, but I really don't think that CFStore is our most beautiful class in 
there and I do believe that DataTracker improves this a bit.

But there is a good part of subjectivity in all this anyway. And if people 
really don't like the move of the bits of querying in there, fine, I'd move 
them back in CFStore and leak the View from DataTracker. I would however be 
more reluctant to remove DataTracker altogether and put the AtomicReference in 
CFStore. Because this would move all the CAS related logic in CFStore and 
seriously there is already too much stuff in CFStore. My humble opinion though. 

> Make changes to the set of memtables and sstables of a cfstore atomic 
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-2284
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2284
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 0.8
>
>         Attachments: 0001-Make-memtable-and-sstable-switches-atomic.patch
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> Some switches happen in the set of memtables and sstables of a cfstore:
>   * when we switch the memtable, the current memtable is replaced by a new 
> one and add to the memtablesPendingFlush
>   * when a memtable is fully flushed, it is removed from 
> memtablesPendingFlush and the newly created sstable is added to the set of 
> active sstables.
>   * after compaction, compacted memtables are removed from the active 
> sstables and the compacted sstable is added instead
> Only the last of these operations is atomic. This ticket proposes to makes 
> all of them atomic, using the idea of the View idea hinted by Stu in the 
> comments of CASSANDRA-1954.
> The main reason for this is to fix CASSANDRA-2105. But I think that another 
> benefit of this is to make reasoning about those operations easier.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to