[
https://issues.apache.org/jira/browse/CASSANDRA-2284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004791#comment-13004791
]
Stu Hood commented on CASSANDRA-2284:
-------------------------------------
> It was only defining the View abstraction and had an AtomicReference to it in
> CFStore.
> That wasn't really pretty honestly.
This is essentially what SSTableTracker was doing as well, and I actually liked
that. This implementation of DataTracker contains query logic, which I do not
think is well encapsulated. It is as easy (and perhaps more likely) to make a
mistake and use 2 different views for a single query in DataTracker, as it
would be if the query logic stayed in CFStore, imo.
One way to encourage a consistent view in CFStore would be to overload
getRangeSlice and getColumnFamily to take a final View as a parameter: the
existing implementation would get a view, and call the overloaded version.
I don't feel terribly strongly about this: I just feel that if query logic
leaks into DataTracker, it is inevitable that all logic will end up there.
> 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