Re: Atomically adding a column to columns_

2010-09-29 Thread Peter Schuller
> It would be good to document this, or, since the > correct-even-for-remove logic is not much more complicated, switch to > that. Submitted: https://issues.apache.org/jira/browse/CASSANDRA-1559 -- / Peter Schuller

Re: Atomically adding a column to columns_

2010-09-27 Thread Jonathan Ellis
On Mon, Sep 27, 2010 at 1:54 PM, Peter Schuller wrote: > In the case of this bit of code, I believe, and I am not speaking > authoritatively, the removal only happens in (1) the read path when > filtering results (on presumably query-local data) and (2) during > compaction (on presumably compactio

Re: Atomically adding a column to columns_

2010-09-27 Thread Peter Schuller
> Function addColumn at class SuperColumn tries to atomically add a column to > the concurrent collection “columns_” using the following code: Deletions in Cassandra involve an insertion of a tombstone rather than actual column deletion. In the case of this bit of code, I believe, and I am not sp

Atomically adding a column to columns_

2010-09-26 Thread Ohad Shacham
adding a column to “columns_” can be as follows: for (;;) { IColumn oldColumn = columns_.get(name); if (oldColumn == null) { if (columns_.putIfAbsent(name, column) == null) return; } else { IColumn reconciledColumn = reconciler.reconcile((Column)column, (Column)oldColumn); if (columns_