git commit: Decide on a gcBefore before sending out TreeRequests

2013-04-09 Thread marcuse
Updated Branches:
  refs/heads/trunk 3e0b21c45 - efbdee237


Decide on a gcBefore before sending out TreeRequests

patch by marcuse, reviewed by yukim, for CASSANDRA-4932


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/efbdee23
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/efbdee23
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/efbdee23

Branch: refs/heads/trunk
Commit: efbdee23705fed6be49a2fb20a79f18c98ff
Parents: 3e0b21c
Author: Marcus Eriksson marc...@spotify.com
Authored: Tue Apr 9 08:08:32 2013 +0200
Committer: Marcus Eriksson marc...@spotify.com
Committed: Tue Apr 9 08:08:32 2013 +0200

--
 CHANGES.txt|3 +-
 .../cassandra/db/compaction/CompactionManager.java |5 ++-
 .../cassandra/service/ActiveRepairService.java |   27 ++
 .../data/serialization/2.0/service.TreeRequest.bin |  Bin 121 - 129 bytes
 .../serialization/2.0/service.TreeResponse.bin |  Bin 930 - 946 bytes
 .../compaction/LeveledCompactionStrategyTest.java  |3 +-
 .../service/AntiEntropyServiceTestAbstract.java|3 +-
 .../cassandra/service/SerializationsTest.java  |2 +-
 8 files changed, 30 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/efbdee23/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index bb00642..b322425 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,7 +28,8 @@
  * remove row-level bloom filters (CASSANDRA-4885)
  * Change Kernel Page Cache skipping into row preheating (disabled by default)
(CASSANDRA-4937)
-
+ * Improve repair by deciding on a gcBefore before sending
+   out TreeRequests (CASSANDRA-4932)
 
 1.2.4
  * Ensure that PerRowSecondaryIndex updates see the most recent values

http://git-wip-us.apache.org/repos/asf/cassandra/blob/efbdee23/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 64cf253..b5aefee 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -618,7 +618,10 @@ public class CompactionManager implements 
CompactionManagerMBean
 // we don't mark validating sstables as compacting in DataTracker, 
so we have to mark them referenced
 // instead so they won't be cleaned up if they do get compacted 
during the validation
 sstables = cfs.markCurrentSSTablesReferenced();
-gcBefore = getDefaultGcBefore(cfs);
+if (validator.request.gcBefore  0)
+gcBefore = validator.request.gcBefore;
+else
+gcBefore = getDefaultGcBefore(cfs);
 }
 
 CompactionIterable ci = new ValidationCompactionIterable(cfs, 
sstables, validator.request.range, gcBefore);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/efbdee23/src/java/org/apache/cassandra/service/ActiveRepairService.java
--
diff --git a/src/java/org/apache/cassandra/service/ActiveRepairService.java 
b/src/java/org/apache/cassandra/service/ActiveRepairService.java
index f103771..f7a5fa4 100644
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@ -442,7 +442,7 @@ public class ActiveRepairService
 public void doVerb(MessageInTreeRequest message, int id)
 {
 TreeRequest remotereq = message.payload;
-TreeRequest request = new TreeRequest(remotereq.sessionid, 
message.from, remotereq.range, remotereq.cf);
+TreeRequest request = new TreeRequest(remotereq.sessionid, 
message.from, remotereq.range, remotereq.gcBefore, remotereq.cf);
 
 // trigger read-only compaction
 ColumnFamilyStore store = 
Table.open(request.cf.left).getColumnFamilyStore(request.cf.right);
@@ -462,7 +462,7 @@ public class ActiveRepairService
 {
 // deserialize the remote tree, and register it
 Validator response = message.payload;
-TreeRequest request = new TreeRequest(response.request.sessionid, 
message.from, response.request.range, response.request.cf);
+TreeRequest request = new TreeRequest(response.request.sessionid, 
message.from, response.request.range, response.request.gcBefore, 
response.request.cf);
 ActiveRepairService.instance.rendezvous(request, response.tree);
 }
 }
@@ -489,20 +489,22 

[Cassandra Wiki] Trivial Update of SoilaGray75 by SoilaGray75

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The SoilaGray75 page has been changed by SoilaGray75:
http://wiki.apache.org/cassandra/SoilaGray75

New page:
32 years old Armed forces band member Johanna is virtually hooked on Used 
automobile sales, rock, jet engines.BR
Last of all he gets motivated by exploring and heading for different cities and 
foreign territories specifically to Moguer.BR
BR
my web page ... 
[[http://videos.Sweethazzard.com/read_blog/14462/euro-weakness-boost-for-tax-havens|http://videos.Sweethazzard.com/read_blog/14462/euro-weakness-boost-for-tax-havens]]


[jira] [Commented] (CASSANDRA-5444) TTL does not compact rows

2013-04-09 Thread Jeremy Hanna (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626381#comment-13626381
 ] 

Jeremy Hanna commented on CASSANDRA-5444:
-

Brandon: to be clear, they saw that when they did the alter table command, it 
would continue to have the range ghost after the ttl + gc_grace + flush + 
compact.  However if they create a new column family with that gc_grace and do 
the same process, the range ghost is no longer there.

 TTL does not compact rows 
 --

 Key: CASSANDRA-5444
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5444
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.9
 Environment: Linux
Reporter: Sathish
 Fix For: 1.1.9


 I find that the rows are not compacted when gc_grace_seconds is set through 
 alter table command. Following were the steps performed:
 1. Created the following table:
 CREATE COLUMNFAMILY MirrorSmokeTest (
 id uuid PRIMARY KEY,
 test_message varchar
 );
 2. Ran an alter command:
 alter table MirrorSmokeTest WITH gc_grace_seconds = 60;
 3. Insert a row into the above table:
 insert into MirrorSmokeTest (id, test_message) Values 
 ('4a7fad82-8298-4d91-85de-8255b7c7e4f5', '2') USING ttl 60;
 4. Waited for 60 seconds and ran a query that results in the following output:
  select * from MirrorSmokeTest;
  id
 --
  4a7fad82-8298-4d91-85de-8255b7c7e4f5
 5. Ran a flush and compact and reran the query that results in the following:
  select * from MirrorSmokeTest;
  id
 --
  4a7fad82-8298-4d91-85de-8255b7c7e4f5

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Cassandra Wiki] Trivial Update of YvonneCul by YvonneCul

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The YvonneCul page has been changed by YvonneCul:
http://wiki.apache.org/cassandra/YvonneCul

New page:
Not much to say about myself I think.BR
Lovely to be a part of apache.org.BR
I just hope Im useful in some way here.BR
BR
Check out my homepage ... 
[[http://www.rentacarlasrosas.com/tenerife/cheap-car-rental-for-south-tenerife-and-the-airport/1282/|car
 rental tenerife airport]]


[jira] [Commented] (CASSANDRA-5444) TTL does not compact rows

2013-04-09 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626397#comment-13626397
 ] 

Sylvain Lebresne commented on CASSANDRA-5444:
-

To start with, in the TTL example you need to wait of at least 120 seconds (TTL 
+ gc_grace), not just 60 seconds as in the description above. The 2nd thing to 
check is to make sure a compaction did occur. For instance, if you use LCS and 
there is only 1 sstable, it won't compact it if memory serves.

 TTL does not compact rows 
 --

 Key: CASSANDRA-5444
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5444
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.9
 Environment: Linux
Reporter: Sathish
 Fix For: 1.1.9


 I find that the rows are not compacted when gc_grace_seconds is set through 
 alter table command. Following were the steps performed:
 1. Created the following table:
 CREATE COLUMNFAMILY MirrorSmokeTest (
 id uuid PRIMARY KEY,
 test_message varchar
 );
 2. Ran an alter command:
 alter table MirrorSmokeTest WITH gc_grace_seconds = 60;
 3. Insert a row into the above table:
 insert into MirrorSmokeTest (id, test_message) Values 
 ('4a7fad82-8298-4d91-85de-8255b7c7e4f5', '2') USING ttl 60;
 4. Waited for 60 seconds and ran a query that results in the following output:
  select * from MirrorSmokeTest;
  id
 --
  4a7fad82-8298-4d91-85de-8255b7c7e4f5
 5. Ran a flush and compact and reran the query that results in the following:
  select * from MirrorSmokeTest;
  id
 --
  4a7fad82-8298-4d91-85de-8255b7c7e4f5

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Cassandra Wiki] Trivial Update of ClintonFo by ClintonFo

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The ClintonFo page has been changed by ClintonFo:
http://wiki.apache.org/cassandra/ClintonFo

New page:
Lorene Steadham is what's written on my birth certificate although it is not 
the name on my birth certificate. My job is a meter reader. I've always loved 
living in Alaska and will never move.BR
To canoe is something I really enjoy doing. I've been working on my website for 
some time now. Check it out here: 
http://michiganjunkyard.com/used-auto-parts-in-ann-arbor-michigan/


[jira] [Updated] (CASSANDRA-5074) Add an official way to disable compaction

2013-04-09 Thread Marcus Eriksson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Eriksson updated CASSANDRA-5074:
---

Attachment: 0001-CASSANDRA-5074-v2.patch

+1 on all the comments

now it is a compaction_strategy_option in cli, and a compaction = {..} option 
in CQL.

i also removed a call to cfs.setCompactionThresholds in the STCS constructor, 
couldn't find a reason it was there.

and, if there is a better way of disallowing min/max thresholds = 0 than 
checking in cql, cql3 and cli that does not break existing schemas, let me know

 Add an official way to disable compaction
 -

 Key: CASSANDRA-5074
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5074
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.0

 Attachments: 
 0001-CASSANDRA-5074-make-it-possible-to-disable-autocompa.patch, 
 0001-CASSANDRA-5074-v2.patch


 We've traditionally used min or max compaction threshold = 0 to disable 
 compaction, but this isn't exactly intuitive and it's inconsistently 
 implemented -- allowed from jmx, not allowed from cli.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (CASSANDRA-5422) Binary protocol sanity check

2013-04-09 Thread Marcus Eriksson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Eriksson reassigned CASSANDRA-5422:
--

Assignee: Daniel Norberg  (was: Marcus Eriksson)

 Binary protocol sanity check
 

 Key: CASSANDRA-5422
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5422
 Project: Cassandra
  Issue Type: Bug
  Components: API
Reporter: Jonathan Ellis
Assignee: Daniel Norberg
 Attachments: 5422-test.txt


 With MutationStatement.execute turned into a no-op, I only get about 33k 
 insert_prepared ops/s on my laptop.  That is: this is an upper bound for our 
 performance if Cassandra were infinitely fast, limited by netty handling the 
 protocol + connections.
 This is up from about 13k/s with MS.execute running normally.
 ~40% overhead from netty seems awfully high to me, especially for 
 insert_prepared where the return value is tiny.  (I also used 4-byte column 
 values to minimize that part as well.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Cassandra Wiki] Trivial Update of JoleneMjf by JoleneMjf

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The JoleneMjf page has been changed by JoleneMjf:
http://wiki.apache.org/cassandra/JoleneMjf

New page:
Roger is what you can call him up but it's not the quite a number of masucline 
name out there. As a man what he really loves is climbing but he will not make 
it his profession. Some time in he chose to live over Alaska but his wife would 
love them to move. Hiring precisely what he does in his employment. If you want 
to find uot more the look at his website: 
http://www.brbdumpsterrental.com/florida/dumpster-rental-in-bradenton-fl/


[Cassandra Wiki] Trivial Update of MerissaCP by MerissaCP

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The MerissaCP page has been changed by MerissaCP:
http://wiki.apache.org/cassandra/MerissaCP

New page:
Not much to say about myself at all.BR
Hurrey Im here and a part of apache.org.BR
I really hope I'm useful at allBR
BR
Feel free to visit my page: [[http://www.lagbook.com/blogs/4219573|Vehicle 
insurance Ratings India]]


[jira] [Commented] (CASSANDRA-2698) Instrument repair to be able to assess it's efficiency (precision)

2013-04-09 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626520#comment-13626520
 ] 

Benedict commented on CASSANDRA-2698:
-

Hi Yuki,

Without in some way collecting (or at least sampling) the size of the 
differences, I don't know what bucket sizes to use. Since I need to reinsert 
all the records once I've decided this anyway, I need to retain them all, which 
I chose to do in EstimatedHistogram as they do, in effect, constitute a 
histogram. I also sample the largest records which I figure could be useful for 
debugging purposes (though that was just a guess). I don't see why 1000s of 
items is a major issue?

I agree that logging is suboptimal for this data. Presumably similar data for 
other tasks may be optionally logged in future, and so I would guess this 
should form part of a discussion about metric logging?

{quote}
fix coding style (especially whitespace) to match other code.
{quote}
Do you have an Eclipse formatter profile I could use for your coding 
convention? I did my best to keep it correct manually, but it is difficult to 
spot differences in an unfamiliar convention. Whitespace should be 
comparatively easy though.

{quote}
EstimatedHistogram#testGroupBy is failing.
{quote}
Noted - will fix and resubmit

{quote}
comparator in Arrays#sort in EstimatedHistogram#logSummary has the same 
conditions in both if and else if.
{quote}
Thanks, good spot. I'm surprised Eclipse didn't warn me.




 Instrument repair to be able to assess it's efficiency (precision)
 --

 Key: CASSANDRA-2698
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2698
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Benedict
Priority: Minor
  Labels: lhf
 Attachments: nodetool_repair_and_cfhistogram.tar.gz, 
 patch_2698_v1.txt, patch.diff, patch-rebased.diff


 Some reports indicate that repair sometime transfer huge amounts of data. One 
 hypothesis is that the merkle tree precision may deteriorate too much at some 
 data size. To check this hypothesis, it would be reasonably to gather 
 statistic during the merkle tree building of how many rows each merkle tree 
 range account for (and the size that this represent). It is probably an 
 interesting statistic to have anyway.   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5417) Push composites support in the storage engine

2013-04-09 Thread T Jake Luciani (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626570#comment-13626570
 ] 

T Jake Luciani commented on CASSANDRA-5417:
---

I started looking at this and so far my comments/questions are:

  -Why do we need AbstractCompositeType now that we use AbstractCType?
  -Why are you using the word 'Dense' internally when CQL3 uses 'Compact'?  I'd 
prefer to see s/Dense/Compact/
 

 Push composites support in the storage engine
 -

 Key: CASSANDRA-5417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5417
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 2.0


 CompositeType happens to be very useful and is now widely used: CQL3 heavily 
 rely on it, and super columns are now using it too internally. Besides, 
 CompositeType has been advised as a replacement of super columns on the 
 thrift side for a while, so it's safe to assume that it's generally used 
 there too.
 CompositeType has initially been introduced as just another AbstractType.  
 Meaning that the storage engine has no nothing whatsoever of composites 
 being, well, composite. This has the following drawbacks:
 * Because internally a composite value is handled as just a ByteBuffer, we 
 end up doing a lot of extra work. Typically, each time we compare 2 composite 
 value, we end up deserializing the components (which, while it doesn't copy 
 data per-se because we just slice the global ByteBuffer, still waste some cpu 
 cycles and allocate a bunch of ByteBuffer objects). And since compare can be 
 called *a lot*, this is likely not negligible.
 * This make CQL3 code uglier than necessary. Basically, CQL3 makes extensive 
 use of composites, and since it gets backs ByteBuffer from the internal 
 columns, it always have to check if it's actually a compositeType or not, and 
 then split it and pick the different parts it needs. It's only an API 
 problem, but having things exposed as composites directly would definitively 
 make thinks cleaner. In particular, in most cases, CQL3 don't care whether it 
 has a composite with only one component or a non-really-composite value, but 
 we still always distinguishes both cases.  Lastly, if we do expose composites 
 more directly internally, it's not a lot more work to internalize better 
 the different parts of the cell name that CQL3 uses (what's the clustering 
 key, what's the actuall CQL3 column name, what's the collection element), 
 making things cleaner. Last but not least, there is currently a bunch of 
 places where methods take a ByteBuffer as argument and it's hard to know 
 whether it expects a cell name or a CQL3 column name. This is pretty error 
 prone.
 * It makes it hard (or impossible) to do a number of performance 
 improvements.  Consider CASSANDRA-4175, I'm not really sure how you can do it 
 properly (in memory) if cell names are just ByteBuffer (since CQL3 column 
 names are just one of the component in general). But we also miss 
 oportunities of sharing prefixes. If we were able to share prefixes of 
 composite names in memory we would 1) lower the memory footprint and 2) 
 potentially speed-up comparison (of the prefixes) by checking reference 
 equality first (also, doing prefix sharing on-disk, which is a separate 
 concern btw, might be easier to do if we do prefix sharing in memory).
 So I suggest pushing CompositeType support inside the storage engine. What I 
 mean by that concretely would be change the internal {{Column.name}} from 
 ByteBuffer to some CellName type. A CellName would API-wise just be a list of 
 ByteBuffer. But in practice, we'd have a specific CellName implementation for 
 not-really-composite names, and the truly composite implementation will allow 
 some prefix sharing. From an external API however, nothing would change, we 
 would pack the composite as usual before sending it back to the client, but 
 at least internally, comparison won't have to deserialize the components 
 every time, and CQL3 code will be cleaner.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5062) Support CAS

2013-04-09 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626574#comment-13626574
 ] 

Sylvain Lebresne commented on CASSANDRA-5062:
-

bq. I don't think PaxosState introduces artificial contention in the sense that 
we do need to serialize paxos operations, so this is definitely better than One 
Big Lock

Sorry that wasn't clear, I was think of contention between proposers, not 
contention local to a replica.  Because we bucket the paxos states, we will 
reuse the same state for different keys. So in other words, the current 
algorithm does not do Paxos at the row level, but rather paxos at the level of 
all rows whose key's hashcode modulo 1024 is equal, and 2 proposers on 2 
different row keys may compete with each other.

And since proposer contention is so damn expensive, I wonder if that artificial 
contention won't trump any gain we have from keeping the paxos state in memory 
(in cases where people have a non-trivial load of CAS operation, even though it 
is on different row keys).  Sure we could play with the STATE_BUCKETS value, 
but I'm still of the opinion that it's premature optimization at this point.

On the part about serializing Paxos operations on a given replica, I agree with 
you that it's necessary, and for that we could absolutely use lock buckets 
(like we use to do for 2ndary indexes) to optimize. But we can do that without 
bucketing the whole paxos states.

As a side note, I think that we may want to TTL the Paxos state (we do store 
the MRC update after all, if someone has done an CAS on a row and don't do any 
CAS anymore, it would be sad to keep that MRC forever). And we can use a 
setting like gc_grace, since provided you do guarantee that everything older 
than gc_grace is consistent, then you can forget about older than gc_grace 
states. Of course, in practice a setting separated from gc_grace would make 
sense.

bq. Would rather make them follow-on tickets

I'm fine with that. Just wanted to mention it cause I don't think we should 
release CAS without those tickets done. Maybe we can create a top-level ticket 
to group all those tickets, making sure we don't forget something important?

bq. We wait for as many nodes as were alive at the start of the paxos request.

Fair enough, I misread that part. *But*, this in turn means that we'll timeout 
as soon as any node that we though were alive happens to be dead, even if we 
have a QUORUM of responses. And since the failure detector takes in general at 
least a handful of seconds to detect a node, it means that each time a node 
dies, *all* CAS operations will timeout until at least one other node detects 
it dead (and while it's true that currently some reads may timeout when a node 
dies, this is at least not all reads and besides, it's known to be bad for 
latency and one of the reason why CASSANDRA-4705 is useful). Overall I think we 
should make progress as soon as we have QUORUM answers.

Furthermore, another problem is that we throw an exception if we haven't a 
quorum on the last MRC. But that means in turns that if amongst all live nodes 
we don't have a QUORUM of nodes that have learn that last MRC, we don't do 
anything to fix the issue (we throw an exception in fact). So if we have really 
lost messages, until something external magically repair the nodes that are 
missing the last MRC, we'll be in a state when no CAS operation on the row can 
proceed at all. Even believing that hinted handoff will be that external 
repair, which would assume that hinted handoffs are bullet-proof (and they are 
not), there could still be a reasonably long window of unavailability just 
because HH delivery is not prioritized/timely.

Lastly, I note that it's not unlikely not to get a QUORUM of node on the last 
MRC due to timing, because the last MRC commit may have reach some replica but 
not all of them (it will even likely be common when proposers contend, because 
the one that gets to be 2nd will do it's prepare phase more or less at the same 
time the previous one does his commit). And in that case, note that nothing is 
wrong with the cluster per se, all replica may be alive. And thus throwing an 
UnavailableException in that case would imo be a very unfriendly user 
experience.

So to recall, what I suggest instead would be to 1) only wait for QUORUM 
responses on prepare then 2) if not everyone is on the same last MRC, then 
repair those are aren't by committing said last MRC (with the MRC ballot in 
particular, not our ballot. This is not part of the Paxos algorithm per-se, 
this is just us re-sending the learn message of the previous round to make sure 
a quorum has it) and then 3) restart from the beginning (i.e. re-prepare).

I believe this does not suffer from the problems above: we prepare, and if the 
first quorum we get hasn't got the last MRC yet (which can be due to timing or 

[jira] [Commented] (CASSANDRA-5417) Push composites support in the storage engine

2013-04-09 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626622#comment-13626622
 ] 

Sylvain Lebresne commented on CASSANDRA-5417:
-

bq. Why do we need AbstractCompositeType now that we use AbstractCType?

One reason is that people may use a CompositeType as column value validator for 
instance. Removing it would break those. And as of this patch, CompositeType is 
still used for the row key even if it's composite. On that last part, I do 
think we should replace it by CType internally at some point because that would 
make sense, but I felt the current patch was big enough currently that this 
could wait a followup ticket.

Another reason is that it's simpler for compatibility. The fact is, even if we 
don't use CompositeType internally, for compatibility sake we need to style 
parse and return stuffs like CompositeType(UTF8Type, IntegerType) in thrift 
CfDef and such. And more generally, there is a few of places in the code where 
it's just simpler to just convert the CType to an equivalent old style 
CompositeType (the cql2 has some of those for instance). Another more minor 
reason is that if someone is crazy enough to use a super column with a 
compositeType comparator or subcomparator today, we'll still use the old 
CompositeType. As for AbstractCompositeType specifically, it's also reused for 
DynamicCompositeType.

That being said, I think that if we do the follow up ticket I mention above of 
using CType for composite row keys to, then I think we can remove some bits 
like the CompositeType.Builder.

bq. Why are you using the word 'Dense' internally when CQL3 uses 'Compact'?

Because they are not equivalent :). I'll admit, this could just be a bad choice 
of terms, but I haven't found much better. But anyway, internally there is 2 
dimensions to the layouts used distinguished by CQL3 which are:
# whether the comparator is either composite or not. In the code I use 
isPacked() to mean not composite at times, though that's also a I haven't 
found better term.
# whether one of the component (the last one or 2nd to last if there is a 
collection) of the comparator stores the CQL3 column name. If that's the case, 
then the CF is not 'dense' (I might use sparse at times in that case), 
otherwise it is. Another more pragramatic to see that is to say that dense CFs 
are those where 1 CQL3 row == 1 internal cell.

Those are the distinction that are useful internally.

But while the 4 combinations of those 2 dimensions make sense, only one of them 
(non packed, non dense) is the default CQL3 layout. All the others are 
created in CQL3 using WITH COMPACT STORAGE. And so in particular, a COMPACT 
static CF, i.e. something like
{noformat}
CREATE TABLE foo {
  k int PRIMARY KEY,
  c1 int,
  c2 text,
  c3 double
} WITH COMPACT STORAGE
{noformat}
is *not* dense (but it is packed). One CQL3 row correspond to a group of 
internal cells.

I'm happy to change the term 'dense' internally if someone has a better 
suggestion, but using 'compact' would confuse things more than anything imo.

 Push composites support in the storage engine
 -

 Key: CASSANDRA-5417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5417
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 2.0


 CompositeType happens to be very useful and is now widely used: CQL3 heavily 
 rely on it, and super columns are now using it too internally. Besides, 
 CompositeType has been advised as a replacement of super columns on the 
 thrift side for a while, so it's safe to assume that it's generally used 
 there too.
 CompositeType has initially been introduced as just another AbstractType.  
 Meaning that the storage engine has no nothing whatsoever of composites 
 being, well, composite. This has the following drawbacks:
 * Because internally a composite value is handled as just a ByteBuffer, we 
 end up doing a lot of extra work. Typically, each time we compare 2 composite 
 value, we end up deserializing the components (which, while it doesn't copy 
 data per-se because we just slice the global ByteBuffer, still waste some cpu 
 cycles and allocate a bunch of ByteBuffer objects). And since compare can be 
 called *a lot*, this is likely not negligible.
 * This make CQL3 code uglier than necessary. Basically, CQL3 makes extensive 
 use of composites, and since it gets backs ByteBuffer from the internal 
 columns, it always have to check if it's actually a compositeType or not, and 
 then split it and pick the different parts it needs. It's only an API 
 problem, but having things exposed as composites directly would definitively 
 make thinks cleaner. In particular, in most cases, CQL3 don't care whether it 
 

[Cassandra Wiki] Trivial Update of MinnieWZD by MinnieWZD

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The MinnieWZD page has been changed by MinnieWZD:
http://wiki.apache.org/cassandra/MinnieWZD

New page:
小売店の地主は積極的に見つけるしようとしています。ポップアップ格納に変更失敗ベンダー。期間、このメトロポリスできます感じるのような海苦痛の。BR
BR
Feel free to visit my homepage: 
[[http://www.lsucb.ro/forum/membru/2457-noahphill/|Website personal 
http://www.ruivitonja.com/]]


[jira] [Commented] (CASSANDRA-5062) Support CAS

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626665#comment-13626665
 ] 

Jonathan Ellis commented on CASSANDRA-5062:
---

bq. in other words, the current algorithm does not do Paxos at the row level, 
but rather paxos at the level of all rows whose key's hashcode modulo 1024 is 
equal, and 2 proposers on 2 different row keys may compete with each other.

Agreed, but what are you proposing as an alternative?  Allocating a lock per 
row would be madness, and attempting to write it without locks looks very 
difficult.

(I will note that the contention is probably not that bad, since the two rows 
would have to hash to the same lock across a majority of replicas, which in a 
vnode world is unlikely.)

bq. this in turn means that we'll timeout as soon as any node that we though 
were alive happens to be dead, even if we have a QUORUM of responses

Not so -- we will wait for it, but when it does not reply we will be able to 
continue as long as the nodes that did reply constitute a quorum.  (I.e., we 
check responseCount vs requiredParticipants, not vs endpoints.size().)

bq. Can't we just say in PrepareCallback that if promised != true for a 
response, then we do a 'while (latch.getCount()  0) latch.countDown()'?

Sure, but then we have to add special cases back up to avoid throwing UAE, or 
move the promise check into PrepareCallback and have it throw a control-flow 
exception, neither of which appeals to me.

bq. I think we want to guarantee that the column timestamp resolution won't 
break that order

You're right, this could get ugly with HH, RR, etc.

 Support CAS
 ---

 Key: CASSANDRA-5062
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5062
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 2.0

 Attachments: half-baked commit 1.jpg, half-baked commit 2.jpg, 
 half-baked commit 3.jpg


 Strong consistency is not enough to prevent race conditions.  The classic 
 example is user account creation: we want to ensure usernames are unique, so 
 we only want to signal account creation success if nobody else has created 
 the account yet.  But naive read-then-write allows clients to race and both 
 think they have a green light to create.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5074) Add an official way to disable compaction

2013-04-09 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626667#comment-13626667
 ] 

Sylvain Lebresne commented on CASSANDRA-5074:
-

bq. i also removed a call to cfs.setCompactionThresholds in the STCS 
constructor, couldn't find a reason it was there

Back in the days (like 1.0 old, when dinosaurs where roaming the earth), we 
used to set the min/max thresholds to 0/Integer.MAX_VALUE in LCS. So STCS 
needed to restore the settings to sane levels in case we were switching from 
LCS to STCS. But since then we've fixed our ways (in CASSANDRA-4233 apparently, 
thanks git pickaxe) so this is just some leftover. It's fine removing it and 
you can even remove the comment the patch adds imo.

bq. if there is a better way of disallowing min/max thresholds = 0 than 
checking in cql, cql3 and cli

Not really.

Otherwise, I've just realized that following CASSANDRA-3430, we need to check 
the ACS.isActive flag *within* getNextBackgroundTask (with the synchronized 
block in particular) otherwise it could be racy. So I think we should move back 
the isAutoCompactionDisabled check from CompactionManager to 
STCS/LCS.getNextBackgroundTask (it's fine to keep the check at the beginning of 
CompactionManager.submitBackground however, no point is pushing tasks that will 
do nothing on the executor). My bad for suggesting otherwise.

But with the above fixed, +1.

Nit: could be nice to preserve the comment in CFS.disableAutoCompaction(), it's 
still useful.


 Add an official way to disable compaction
 -

 Key: CASSANDRA-5074
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5074
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.0

 Attachments: 
 0001-CASSANDRA-5074-make-it-possible-to-disable-autocompa.patch, 
 0001-CASSANDRA-5074-v2.patch


 We've traditionally used min or max compaction threshold = 0 to disable 
 compaction, but this isn't exactly intuitive and it's inconsistently 
 implemented -- allowed from jmx, not allowed from cli.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4463) Nodes Don't Restart: Assertion Error on Serializing Cache provider

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-4463:
--

 Reviewer: dbrosius
Fix Version/s: 1.1.11
 Assignee: Jonathan Ellis

 Nodes Don't Restart: Assertion Error on Serializing Cache provider
 --

 Key: CASSANDRA-4463
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4463
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
 Environment: Ubuntu 12.04 Precise
 Cassandra 1.1.5
 Oracle Java 6
Reporter: Arya Goudarzi
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.1.11


 I stopped Cassandra on one of our 1.1.2 nodes and I couldn't start it any 
 more. System.log didn't have much useful info but output.log had this:
 java.lang.AssertionError
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:43)
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:39)
 at 
 org.apache.cassandra.cache.SerializingCache.serialize(SerializingCache.java:116)
 at 
 org.apache.cassandra.cache.SerializingCache.put(SerializingCache.java:174)
 at 
 org.apache.cassandra.cache.InstrumentingCache.put(InstrumentingCache.java:45)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.initRowCache(ColumnFamilyStore.java:430)
 at org.apache.cassandra.db.Table.open(Table.java:124)
 at org.apache.cassandra.db.Table.open(Table.java:97)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:204)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.init(AbstractCassandraDaemon.java:254)
 at 
 com.netflix.priam.cassandra.NFThinCassandraDaemon.init(NFThinCassandraDaemon.java:41)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:212)
 Cannot load daemon
 Service exit with a return value of 3
 Deleting the stuff in saved_caches folder fixed the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4463) Nodes Don't Restart: Assertion Error on Serializing Cache provider

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-4463:
--

Attachment: 4463.txt

Null CFs are not allowed in the row cache.  The normal read path checks this as 
follows:

{code}
.   ColumnFamily data = 
getTopLevelColumns(QueryFilter.getIdentityFilter(filter.key, new 
QueryPath(columnFamily)),
   Integer.MIN_VALUE,
   true);
if (sentinelSuccess  data != null)
CacheService.instance.rowCache.replace(key, sentinel, data);
{code}

We need to check this during cache population at startup as well, since the 
cache is only saved intermittently -- a row that contained data when the cache 
was saved, and subsequently invalidated, will read as null on the following 
startup.

 Nodes Don't Restart: Assertion Error on Serializing Cache provider
 --

 Key: CASSANDRA-4463
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4463
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
 Environment: Ubuntu 12.04 Precise
 Cassandra 1.1.5
 Oracle Java 6
Reporter: Arya Goudarzi
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.1.11

 Attachments: 4463.txt


 I stopped Cassandra on one of our 1.1.2 nodes and I couldn't start it any 
 more. System.log didn't have much useful info but output.log had this:
 java.lang.AssertionError
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:43)
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:39)
 at 
 org.apache.cassandra.cache.SerializingCache.serialize(SerializingCache.java:116)
 at 
 org.apache.cassandra.cache.SerializingCache.put(SerializingCache.java:174)
 at 
 org.apache.cassandra.cache.InstrumentingCache.put(InstrumentingCache.java:45)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.initRowCache(ColumnFamilyStore.java:430)
 at org.apache.cassandra.db.Table.open(Table.java:124)
 at org.apache.cassandra.db.Table.open(Table.java:97)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:204)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.init(AbstractCassandraDaemon.java:254)
 at 
 com.netflix.priam.cassandra.NFThinCassandraDaemon.init(NFThinCassandraDaemon.java:41)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:212)
 Cannot load daemon
 Service exit with a return value of 3
 Deleting the stuff in saved_caches folder fixed the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5062) Support CAS

2013-04-09 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626694#comment-13626694
 ] 

Sylvain Lebresne commented on CASSANDRA-5062:
-

bq. Allocating a lock per row would be madness

Again, I'm not talking about locks here. We can use one true paxos state per 
row (which is the alternative I'm suggesting) but still use a 'hashcode % 1024' 
number of locks for actually protecting the read/write to the paxos system 
table.

What I am suggesting is that we wouldn't keep paxos states in memory however, 
i.e. we would always access the system table (and no, I don't necessarily think 
this would necessarily destroy performance (some of the reasons are in comment 
above). More importantly I think we shouldn't optimize this before having 
tested it, since this change the level at which the algorithm apply and that's 
not nothing).

bq. we will wait for it, but when it does not reply we will be able to continue 
as long as the nodes that did reply constitute a quorum

Alright, didn't so we weren't throwing a timeout in that case. But we'll still 
wait rpcTimeout (10 seconds by default!), so I don't think it's much better. In 
particular because I really think that ultimately we should respect the overall 
write rpc timeout for CAS operation (not suggesting we should do it now, I'm 
fine having that being a follow up).

Besides, there is still the 2 other problems I've mentionned.

bq. then we have to add special cases back up to avoid throwing UAE

Granted, but I'm (strongly) convinced that throwing this UAE is wrong in the 
first place. Let say that provided checking 'callback.isPromised' is the first 
thing we do, which I believe we should, then there is no special casing to do. 


 Support CAS
 ---

 Key: CASSANDRA-5062
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5062
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 2.0

 Attachments: half-baked commit 1.jpg, half-baked commit 2.jpg, 
 half-baked commit 3.jpg


 Strong consistency is not enough to prevent race conditions.  The classic 
 example is user account creation: we want to ensure usernames are unique, so 
 we only want to signal account creation success if nobody else has created 
 the account yet.  But naive read-then-write allows clients to race and both 
 think they have a green light to create.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Stop calling the binary proto spec a draft since we've released it

2013-04-09 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 c5820eda4 - fd588f622


Stop calling the binary proto spec a draft since we've released it


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fd588f62
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd588f62
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd588f62

Branch: refs/heads/cassandra-1.2
Commit: fd588f62278ca9e0399ab7b23596d9cbd6b02adf
Parents: c5820ed
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Apr 9 17:27:39 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Apr 9 17:27:47 2013 +0200

--
 doc/native_protocol.spec |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd588f62/doc/native_protocol.spec
--
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index 7d0d07b..fb709e3 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -1,6 +1,6 @@
 
  CQL BINARY PROTOCOL v1
-(draft)
+
 
 Table of Contents
 



[jira] [Commented] (CASSANDRA-5062) Support CAS

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626715#comment-13626715
 ] 

Jonathan Ellis commented on CASSANDRA-5062:
---

bq. We can use one true paxos state per row (which is the alternative I'm 
suggesting) but still use a 'hashcode % 1024' number of locks for actually 
protecting the read/write to the paxos system table.

That doesn't solve the problem I'm thinking of.  Suppose Proposer1 (P1) asks 
for a promise of ballot 1 (B1).  Then P2 asks for a promise of B2.  Meanwhile, 
P1 proposes (B1, V1).  If the PaxosState.propose is not locked vs prepare for 
that row, then it could promise B2 but subsequently accept (B1, V1) which is a 
violation of the protocol.

bq. we'll still wait rpcTimeout (10 seconds by default!)

I'm okay with this since nodes going down mid-request before FD notices is a 
pretty rare case.

I further note that anything that starts with only wait for quorum [even if 
there are other live nodes around] means that it's more likely that the 
replicas we don't wait for will stay out of date longer than they should for 
the MRC check.

So I see this as two alternatives, each with drawbacks, rather than one 
strictly better than the other.  And I prefer the alternative that already has 
code written. :)

bq. I'm (strongly) convinced that throwing this UAE is wrong in the first place

Huh?  If too many replicas are down and we don't get a promise, your logic says 
we should retry with a new (higher) ballot, in which case we will get UAE 
almost all the time, since few node failure modes will result in a recovery in 
under 100ms.

 Support CAS
 ---

 Key: CASSANDRA-5062
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5062
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 2.0

 Attachments: half-baked commit 1.jpg, half-baked commit 2.jpg, 
 half-baked commit 3.jpg


 Strong consistency is not enough to prevent race conditions.  The classic 
 example is user account creation: we want to ensure usernames are unique, so 
 we only want to signal account creation success if nobody else has created 
 the account yet.  But naive read-then-write allows clients to race and both 
 think they have a green light to create.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5062) Support CAS

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626718#comment-13626718
 ] 

Jonathan Ellis commented on CASSANDRA-5062:
---

(pushed a commit to make paxos proposals always use the timestamp from the 
ballot.)

 Support CAS
 ---

 Key: CASSANDRA-5062
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5062
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 2.0

 Attachments: half-baked commit 1.jpg, half-baked commit 2.jpg, 
 half-baked commit 3.jpg


 Strong consistency is not enough to prevent race conditions.  The classic 
 example is user account creation: we want to ensure usernames are unique, so 
 we only want to signal account creation success if nobody else has created 
 the account yet.  But naive read-then-write allows clients to race and both 
 think they have a green light to create.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5442) Add support for specifying CAS commit CL

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626721#comment-13626721
 ] 

Jonathan Ellis commented on CASSANDRA-5442:
---

I don't think this is as simple as it looks at first.  Suppose we specify 
CL.ALL and a node is down.  That implies we should throw WriteTimedOutException 
-- but which part of the write is it that timed out?  I.e., how does the caller 
know it was the commit that timed out, and not an earlier stage of Paxos?

In this example a sufficiently smart client could examine the exception and 
notice that we were requiring all replicas, and commit is the only part of 
Paxos that could do that.  But what if we had CL.QUORUM and timed out on 
commit?  Now this looks like any other time out, and there's nothing that tells 
the caller that the proposal was accepted by a majority (and thus will be 
visible to the next CAS round or reads at CL.SERIAL).

 Add support for specifying CAS commit CL
 

 Key: CASSANDRA-5442
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5442
 Project: Cassandra
  Issue Type: Sub-task
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 2.0




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5349) Add binary protocol support for bind variables to non-prepared statements

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-5349:
--

Reviewer: slebresne  (was: jbellis)

 Add binary protocol support for bind variables to non-prepared statements
 -

 Key: CASSANDRA-5349
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5349
 Project: Cassandra
  Issue Type: Task
  Components: API
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.0

 Attachments: 
 0001-CASSANDRA-5349-binary-protocol-support-for-binding-v.patch


 Currently, the binary protocol allows requests as string or [prepared 
 statement] id + bind vars.  Allowing string + bind vars as well would 
 simplify life for users with one-off statements and not have to choose 
 between adding boilerplate for PS, and having to manually escape parameters, 
 which is particularly painful for binary data.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5357) Query cache

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626735#comment-13626735
 ] 

Jonathan Ellis commented on CASSANDRA-5357:
---

bq. What i had in mind was to do something like MapRowKey, 
[QueryFilter,ColumnFamily] so invalidation is O(1). To further improve the 
performance on a query (And deserializing the whole [QueryFilter,ColumnFamily] 
we can have all the QueryFilters as a part of the RowKey (Kind of like promoted 
index's).

I don't follow -- how can you have both O(1) [Map key is the row key] and also 
promote QF into the key?

bq. If we do this then the K (For a fat row) becomes big enough to cause more 
heap issue. Hence we could move that to off-heap along with CF.

We're talking about K=Map Key, right?  How do you see QF increasing by row size?



 Query cache
 ---

 Key: CASSANDRA-5357
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5357
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Assignee: Vijay

 I think that most people expect the row cache to act like a query cache, 
 because that's a reasonable model.  Caching the entire partition is, in 
 retrospect, not really reasonable, so it's not surprising that it catches 
 people off guard, especially given the confusion we've inflicted on ourselves 
 as to what a row constitutes.
 I propose replacing it with a true query cache.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5441) Add support for read at CL.SERIAL

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626744#comment-13626744
 ] 

Jonathan Ellis commented on CASSANDRA-5441:
---

I think this is as simple as perform the prepare/complete 
in-progress-proposals part of Paxos, followed by a Quorum read.

 Add support for read at CL.SERIAL
 -

 Key: CASSANDRA-5441
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5441
 Project: Cassandra
  Issue Type: Sub-task
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 2.0




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5445) PerRowSecondaryIndex isn't notified of row-level deletes

2013-04-09 Thread Sam Tunnicliffe (JIRA)
Sam Tunnicliffe created CASSANDRA-5445:
--

 Summary: PerRowSecondaryIndex isn't notified of row-level deletes
 Key: CASSANDRA-5445
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5445
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.3
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe


Following CASSANDRA-5297, the way PerRowSecondaryIndex updates are handled in 
AtomicSortedColumns is still not right as it doesn't cater for row level 
deletes properly. The key is only added MixedIndexUpdater's list of deferred 
updates if there's a column value being modified. Where an entire row is 
deleted, we never hit that code so the indexer.commit() in 
ASC.addAllWithSizeDelta becomes a no-op  the index is not correctly updated. 

Also, SecondaryIndexManager.updaterFor is not actually as efficient as it first 
seems. For a CF with no per-column indexes and a single per-row index defined, 
during compaction (when includeRowIndexes == false), we'd expect to be using 
nullUpdater to no-op the index update for each row being compacted given the 
updaterFor implementation:

{code}
return (includeRowIndexes  !rowLevelIndexMap.isEmpty())
? new MixedIndexUpdater(key)
: indexesByColumn.isEmpty() ? nullUpdater : new 
PerColumnIndexUpdater(key);
{code}

However, this isn't the case as indexesByColumn is never empty, the reason 
being that any index *must* be attached to a column, there's just no way to 
register a PRSI without attaching it to one of the CF's columns. So where a 
PRSI is present, a new PCIU instance is created for each row during compaction 
regardless. With that in mind, I'd propose removing the includeRowLevelIndexes 
argument and just returning nullIndexer if no indexes (PRSI or PRCI) are 
configured (although I totally acknowledge that fixing index registration so we 
can register a PRSI without attaching it to a column would be desirable in the 
long-term).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5445) PerRowSecondaryIndex isn't notified of row-level deletes

2013-04-09 Thread Sam Tunnicliffe (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sam Tunnicliffe updated CASSANDRA-5445:
---

Attachment: 5445.txt

 PerRowSecondaryIndex isn't notified of row-level deletes
 

 Key: CASSANDRA-5445
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5445
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.3
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Attachments: 5445.txt


 Following CASSANDRA-5297, the way PerRowSecondaryIndex updates are handled in 
 AtomicSortedColumns is still not right as it doesn't cater for row level 
 deletes properly. The key is only added MixedIndexUpdater's list of deferred 
 updates if there's a column value being modified. Where an entire row is 
 deleted, we never hit that code so the indexer.commit() in 
 ASC.addAllWithSizeDelta becomes a no-op  the index is not correctly updated. 
 Also, SecondaryIndexManager.updaterFor is not actually as efficient as it 
 first seems. For a CF with no per-column indexes and a single per-row index 
 defined, during compaction (when includeRowIndexes == false), we'd expect to 
 be using nullUpdater to no-op the index update for each row being compacted 
 given the updaterFor implementation:
 {code}
   return (includeRowIndexes  !rowLevelIndexMap.isEmpty())
   ? new MixedIndexUpdater(key)
   : indexesByColumn.isEmpty() ? nullUpdater : new 
 PerColumnIndexUpdater(key);
 {code}
 However, this isn't the case as indexesByColumn is never empty, the reason 
 being that any index *must* be attached to a column, there's just no way to 
 register a PRSI without attaching it to one of the CF's columns. So where a 
 PRSI is present, a new PCIU instance is created for each row during 
 compaction regardless. With that in mind, I'd propose removing the 
 includeRowLevelIndexes argument and just returning nullIndexer if no indexes 
 (PRSI or PRCI) are configured (although I totally acknowledge that fixing 
 index registration so we can register a PRSI without attaching it to a column 
 would be desirable in the long-term).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5424) nodetool repair -pr on all nodes won't repair the full range when a Keyspace isn't in all DC's

2013-04-09 Thread Yuki Morishita (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626786#comment-13626786
 ] 

Yuki Morishita commented on CASSANDRA-5424:
---

CASSANDRA-3912 changed the behavior of repair to not perform if given range is 
not part of the local node for Keyspace that does not have replica.
For above case, StorageService#getLocalRanges 
[here|https://github.com/apache/cassandra/blob/cassandra-1.1.9/src/java/org/apache/cassandra/service/AntiEntropyService.java#L160]
 would return null for /10.72.111.225 and range 
(127605887595351923798765477786913079296,0].

Repair always sends merkle tree request to local node and synchronizes with 
others, so the desired behavior would be to just send merkle tree requests to 
those who have replica and let them synchronize.

 nodetool repair -pr on all nodes won't repair the full range when a Keyspace 
 isn't in all DC's
 --

 Key: CASSANDRA-5424
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5424
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.7
Reporter: Jeremiah Jordan
Priority: Critical

 nodetool repair -pr on all nodes won't repair the full range when a Keyspace 
 isn't in all DC's
 Commands follow, but the TL;DR of it, range 
 (127605887595351923798765477786913079296,0] doesn't get repaired between .38 
 node and .236 node until I run a repair, no -pr, on .38
 It seems like primary arnge calculation doesn't take schema into account, but 
 deciding who to ask for merkle tree's from does.
 {noformat}
 Address DC  RackStatus State   LoadOwns   
  Token   
   
  127605887595351923798765477786913079296 
 10.72.111.225   Cassandra   rack1   Up Normal  455.87 KB   25.00% 
  0   
 10.2.29.38  Analytics   rack1   Up Normal  40.74 MB25.00% 
  42535295865117307932921825928971026432  
 10.46.113.236   Analytics   rack1   Up Normal  20.65 MB50.00% 
  127605887595351923798765477786913079296 
 create keyspace Keyspace1
   with placement_strategy = 'NetworkTopologyStrategy'
   and strategy_options = {Analytics : 2}
   and durable_writes = true;
 ---
 # nodetool -h 10.2.29.38 repair -pr Keyspace1 Standard1
 [2013-04-03 15:46:58,000] Starting repair command #1, repairing 1 ranges for 
 keyspace Keyspace1
 [2013-04-03 15:47:00,881] Repair session b79b4850-9c75-11e2--8b5bf6ebea9e 
 for range (0,42535295865117307932921825928971026432] finished
 [2013-04-03 15:47:00,881] Repair command #1 finished
 root@ip-10-2-29-38:/home/ubuntu# grep b79b4850-9c75-11e2--8b5bf6ebea9e 
 /var/log/cassandra/system.log
  INFO [AntiEntropySessions:1] 2013-04-03 15:46:58,009 AntiEntropyService.java 
 (line 676) [repair #b79b4850-9c75-11e2--8b5bf6ebea9e] new session: will 
 sync a1/10.2.29.38, /10.46.113.236 on range 
 (0,42535295865117307932921825928971026432] for Keyspace1.[Standard1]
  INFO [AntiEntropySessions:1] 2013-04-03 15:46:58,015 AntiEntropyService.java 
 (line 881) [repair #b79b4850-9c75-11e2--8b5bf6ebea9e] requesting merkle 
 trees for Standard1 (to [/10.46.113.236, a1/10.2.29.38])
  INFO [AntiEntropyStage:1] 2013-04-03 15:47:00,202 AntiEntropyService.java 
 (line 211) [repair #b79b4850-9c75-11e2--8b5bf6ebea9e] Received merkle 
 tree for Standard1 from /10.46.113.236
  INFO [AntiEntropyStage:1] 2013-04-03 15:47:00,697 AntiEntropyService.java 
 (line 211) [repair #b79b4850-9c75-11e2--8b5bf6ebea9e] Received merkle 
 tree for Standard1 from a1/10.2.29.38
  INFO [AntiEntropyStage:1] 2013-04-03 15:47:00,879 AntiEntropyService.java 
 (line 1015) [repair #b79b4850-9c75-11e2--8b5bf6ebea9e] Endpoints 
 /10.46.113.236 and a1/10.2.29.38 are consistent for Standard1
  INFO [AntiEntropyStage:1] 2013-04-03 15:47:00,880 AntiEntropyService.java 
 (line 788) [repair #b79b4850-9c75-11e2--8b5bf6ebea9e] Standard1 is fully 
 synced
  INFO [AntiEntropySessions:1] 2013-04-03 15:47:00,880 AntiEntropyService.java 
 (line 722) [repair #b79b4850-9c75-11e2--8b5bf6ebea9e] session completed 
 successfully
 root@ip-10-46-113-236:/home/ubuntu# grep b79b4850-9c75-11e2--8b5bf6ebea9e 
 /var/log/cassandra/system.log
  INFO [AntiEntropyStage:1] 2013-04-03 15:46:59,944 AntiEntropyService.java 
 (line 244) [repair #b79b4850-9c75-11e2--8b5bf6ebea9e] Sending completed 
 merkle tree to /10.2.29.38 for (Keyspace1,Standard1)
 root@ip-10-72-111-225:/home/ubuntu# grep b79b4850-9c75-11e2--8b5bf6ebea9e 
 /var/log/cassandra/system.log
 

git commit: Add an official way to disable autocompaction.

2013-04-09 Thread marcuse
Updated Branches:
  refs/heads/trunk efbdee237 - ebefb77c6


Add an official way to disable autocompaction.

patch by marcuse, reviewed by pcmanus for CASSANDRA-5074


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ebefb77c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ebefb77c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ebefb77c

Branch: refs/heads/trunk
Commit: ebefb77c6e8a5046a8c1b1bb0edd258aaf0ad8b7
Parents: efbdee2
Author: Marcus Eriksson marc...@spotify.com
Authored: Tue Apr 9 18:28:11 2013 +0200
Committer: Marcus Eriksson marc...@spotify.com
Committed: Tue Apr 9 18:28:11 2013 +0200

--
 CHANGES.txt|1 +
 NEWS.txt   |3 +
 src/java/org/apache/cassandra/cli/CliClient.java   |8 +++-
 .../org/apache/cassandra/config/CFMetaData.java|6 ++-
 .../apache/cassandra/cql/AlterTableStatement.java  |8 ++-
 .../cassandra/cql/CreateColumnFamilyStatement.java |   10 +++-
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |8 ++-
 .../apache/cassandra/db/CollationController.java   |2 +-
 .../org/apache/cassandra/db/ColumnFamilyStore.java |   40 +++---
 .../cassandra/db/ColumnFamilyStoreMBean.java   |5 +--
 .../db/compaction/AbstractCompactionStrategy.java  |   34 
 .../cassandra/db/compaction/CompactionManager.java |6 ++
 .../db/compaction/LeveledCompactionStrategy.java   |2 +-
 .../compaction/SizeTieredCompactionStrategy.java   |   11 ++---
 .../apache/cassandra/service/StorageService.java   |   18 +++
 .../cassandra/service/StorageServiceMBean.java |4 ++
 src/java/org/apache/cassandra/tools/NodeCmd.java   |   11 -
 src/java/org/apache/cassandra/tools/NodeProbe.java |   10 
 .../org/apache/cassandra/tools/NodeToolHelp.yaml   |6 ++
 .../cassandra/db/compaction/TTLExpiryTest.java |6 +--
 20 files changed, 163 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ebefb77c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b322425..18c267a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -30,6 +30,7 @@
(CASSANDRA-4937)
  * Improve repair by deciding on a gcBefore before sending
out TreeRequests (CASSANDRA-4932)
+ * Add an official way to disable compactions (CASSANDRA-5074)
 
 1.2.4
  * Ensure that PerRowSecondaryIndex updates see the most recent values

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ebefb77c/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 3c5e07b..1c68de6 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -30,6 +30,9 @@ Operations
 --
 - Major compactions, cleanup, scrub, and upgradesstables will interrupt 
   any in-progress compactions (but not repair validations) when invoked.
+- Disabling autocompactions by setting min/max compaction threshold to 0
+  has been deprecated, instead, use the nodetool commands 
'disableautocompaction'
+  and 'enableautocompaction' or set the compaction strategy option enabled 
= false
 
 
 1.2.4

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ebefb77c/src/java/org/apache/cassandra/cli/CliClient.java
--
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java 
b/src/java/org/apache/cassandra/cli/CliClient.java
index 9347b59..7ff9048 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -1311,9 +1311,15 @@ public class CliClient
 
cfDef.setDefault_validation_class(CliUtils.unescapeSQLString(mValue));
 break;
 case MIN_COMPACTION_THRESHOLD:
-cfDef.setMin_compaction_threshold(Integer.parseInt(mValue));
+int threshold = Integer.parseInt(mValue);
+if (threshold = 0)
+throw new RuntimeException(Disabling compaction by 
setting min/max compaction thresholds to 0 has been deprecated, set 
compaction_strategy_options={'enabled':false} instead);
+cfDef.setMin_compaction_threshold(threshold);
 break;
 case MAX_COMPACTION_THRESHOLD:
+threshold = Integer.parseInt(mValue);
+if (threshold = 0)
+throw new RuntimeException(Disabling compaction by 
setting min/max compaction thresholds to 0 has been deprecated, set 
compaction_strategy_options={'enabled':false} instead);
 cfDef.setMax_compaction_threshold(Integer.parseInt(mValue));
 break;
 case REPLICATE_ON_WRITE:


[jira] [Commented] (CASSANDRA-5062) Support CAS

2013-04-09 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626789#comment-13626789
 ] 

Sylvain Lebresne commented on CASSANDRA-5062:
-

bq. If the PaxosState.propose is not locked vs prepare for that row

I'm lost. I totally agree with you that we should lock propose vs prepare.

But we could have an array of 1024 Lock object somewhere, and *both* propose 
and prepare for key k would do:
{noformat}
Lock lock = locks[k.hashCode() % 1024];
lock.lock();
try {
// do whatever you should
} finally {
lock.release();
}
{noformat}
I.e. exactly what we used to do to protect 2ndary indexes writes.

I'm not critizing the fact that propose and prepare are synchronized together, 
they should be. And yes, having 1 lock per row would be crazy, so I'm fine 
having just a fixed amount of locks. Because I'm not worried about local 
contention on the PaxosState propose and prepare method.

The contention I'm more worried about is that because we may use the same 
PaxosState object for say row k1 and k2, a proposer on k1 will contend with a 
proposer on k2, even though those are different rows. And that contention might 
mean one of the proposer will get pre-empted during propose and will have to 
restart from scratch. Which is costly, because that's a bunch of round-trip 
message wasted.

To take a step back, what I'm saying is that a priori, the way I would have 
coded this, would have been to just use the system table for paxos states, 
without trying to cache them in memory manually (which is the reason why we 
need to bucket them, so it don't get crazy) and just trust our storage engine 
initially. And we would use the locks to protect the propose and prepare phase 
as described above.

Now I'm not necessarily saying that doing what I've just described would be 
necessarily more efficient, but at least it's not absolutely clear to me that 
the current patch is always a win. Because what it means on slightly faster 
local reads (and since we do read-by-name, even if we were to read the system 
table directly, we wouldn't hit disk most of the time, so it's not totally 
clear how much faster it is) against higher contention at the paxos level 
(which, as said above, is potentially order of magnitudes more costly). Again, 
I don't what's best, but since it feels to me that having one paxos state per 
row is more natural, I feel the current way of keeping paxos states in memory 
is a bit of a premature optimisation, and thus I would have prefered keeping 
that for later if we realise there is a need to optimise.


bq. it's more likely that the replicas we don't wait for will stay out of date 
longer than they should for the MRC check

First, that wouldn't matter for the correctness of the overall algorithm, so at 
this point I would say that it's not a big deal, at best a performance 
argument. Second, we can absolutely do what we do for read repair, i.e. when we 
receive responses after the initial QUORUM, we repair in the background if 
needed. We have prior arts and that's not very hard to do. 

bq. So I see this as two alternatives, each with drawbacks, rather than one 
strictly better than the other

I couldn't disagree more. Unless I misread the code, in which case I'm sorry, 
the current patch can get in a state where for a row no CAS operation on that 
row can be done at all (they will all UAE) until the user does a manual repair, 
because if less than a quorum of replica have received the last MRC commit 
message, there is no mechanism to heal that situation (since we UAE *before* we 
may heal replica if we are in a situation where say only quorum nodes are 
alive, but less than quorum have the last MRC).

Also, again unless I read this wrong, the current patch may throw UAE 
exceptions even when no replica in the cluster are dead and there is no real 
reason to throw (again, in the case where less than a quorum of replica that 
respond have the MRC, which can happen even during normal operation with no 
errors).

And I think that both of those (not combined, each of them) are big deals.  
Blockers in fact.

bq. And I prefer the alternative that already has code written.

So to be clear, the alternative I'm suggesting is a few lines of changes. I'm 
happy to provide a commit with said change if it's not very clear what I'm 
talking about.

bq. If too many replicas are down and we don't get a promise, your logic says 
we should retry with a new (higher) ballot

Absolutely not. I have no problem with throwing an UAE if too many replica are 
*down*, what else could we do? I have a problem with throwing a UAE if enough 
(i.e. a quorum) replica are up *but* not enough have the last MRC.


 Support CAS
 ---

 Key: CASSANDRA-5062
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5062
 Project: Cassandra
  

[jira] [Commented] (CASSANDRA-5417) Push composites support in the storage engine

2013-04-09 Thread T Jake Luciani (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626791#comment-13626791
 ] 

T Jake Luciani commented on CASSANDRA-5417:
---

It seems like this patch cleans up a lot for the cql3 use case, but it is 
adding to the overall mess that we have from supporting all these different 
implementations.
The storage engine is too tied to the public APIs and CQL seems to just be 
pushing itself along side it now.

Things like CType.asAbstractType is obviously a problem and it makes me worry 
about the maintainability of this kind of change.  

If anything this patch doesn't go far enough since I don't see where/how this 
gets better.  
I'll keep absorbing for a few more days...





 Push composites support in the storage engine
 -

 Key: CASSANDRA-5417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5417
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 2.0


 CompositeType happens to be very useful and is now widely used: CQL3 heavily 
 rely on it, and super columns are now using it too internally. Besides, 
 CompositeType has been advised as a replacement of super columns on the 
 thrift side for a while, so it's safe to assume that it's generally used 
 there too.
 CompositeType has initially been introduced as just another AbstractType.  
 Meaning that the storage engine has no nothing whatsoever of composites 
 being, well, composite. This has the following drawbacks:
 * Because internally a composite value is handled as just a ByteBuffer, we 
 end up doing a lot of extra work. Typically, each time we compare 2 composite 
 value, we end up deserializing the components (which, while it doesn't copy 
 data per-se because we just slice the global ByteBuffer, still waste some cpu 
 cycles and allocate a bunch of ByteBuffer objects). And since compare can be 
 called *a lot*, this is likely not negligible.
 * This make CQL3 code uglier than necessary. Basically, CQL3 makes extensive 
 use of composites, and since it gets backs ByteBuffer from the internal 
 columns, it always have to check if it's actually a compositeType or not, and 
 then split it and pick the different parts it needs. It's only an API 
 problem, but having things exposed as composites directly would definitively 
 make thinks cleaner. In particular, in most cases, CQL3 don't care whether it 
 has a composite with only one component or a non-really-composite value, but 
 we still always distinguishes both cases.  Lastly, if we do expose composites 
 more directly internally, it's not a lot more work to internalize better 
 the different parts of the cell name that CQL3 uses (what's the clustering 
 key, what's the actuall CQL3 column name, what's the collection element), 
 making things cleaner. Last but not least, there is currently a bunch of 
 places where methods take a ByteBuffer as argument and it's hard to know 
 whether it expects a cell name or a CQL3 column name. This is pretty error 
 prone.
 * It makes it hard (or impossible) to do a number of performance 
 improvements.  Consider CASSANDRA-4175, I'm not really sure how you can do it 
 properly (in memory) if cell names are just ByteBuffer (since CQL3 column 
 names are just one of the component in general). But we also miss 
 oportunities of sharing prefixes. If we were able to share prefixes of 
 composite names in memory we would 1) lower the memory footprint and 2) 
 potentially speed-up comparison (of the prefixes) by checking reference 
 equality first (also, doing prefix sharing on-disk, which is a separate 
 concern btw, might be easier to do if we do prefix sharing in memory).
 So I suggest pushing CompositeType support inside the storage engine. What I 
 mean by that concretely would be change the internal {{Column.name}} from 
 ByteBuffer to some CellName type. A CellName would API-wise just be a list of 
 ByteBuffer. But in practice, we'd have a specific CellName implementation for 
 not-really-composite names, and the truly composite implementation will allow 
 some prefix sharing. From an external API however, nothing would change, we 
 would pack the composite as usual before sending it back to the client, but 
 at least internally, comparison won't have to deserialize the components 
 every time, and CQL3 code will be cleaner.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5417) Push composites support in the storage engine

2013-04-09 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626893#comment-13626893
 ] 

Sylvain Lebresne commented on CASSANDRA-5417:
-

bq. it is adding to the overall mess that we have from supporting all these 
different implementations

It was my hope that the code was at least encapsulating thing more cleanly. 

bq. The storage engine is too tied to the public APIs

I don't disagree, but at the same time we've made promises that we wouldn't 
break most of those public API.

bq. Things like CType.asAbstractType is obviously a problem and it makes me 
worry about the maintainability of this kind of change

Fair enough. But for what it's worth, things like asAbstractType don't seem 
like a big deal to me. There is a few shortcuts like that that the patch use to 
avoid rewriting all of Cassandra in one patch, but imo they are used in 
relative clear boundaries (i.e. between thrift/cql2 and the internal storage). 
At least, that was the intent :)

bq. If anything this patch doesn't go far enough since I don't see where/how 
this gets better

To be clear, I don't intend this patch to be an end. There is definitively more 
things that can be cleaned up and we can absolutely push things further. But at 
the same time, I'm not sure rewriting all the things in one go is going to be 
realistic.

I do think that the impedance mismatch between CQL3 and the storage engine is 
getting in our way, and I do think we should do something about it. This patch 
is a suggestion, which is trying to take an incrementalish approach. I'm open 
to other solution/modification though. But I'll also note that cleaning up 
CQL3 code is not the only reason for this ticket, encapsulating the composite 
nature of column names so we can optimize things later is another (and here 
again, I realize that the patch itself does not add the optimizations per se, 
but I was just not convinced that sealing myself in a cave for 2 months to 
implement all the optimization I can think of that make use of this ticket 
would be the best strategy).



 Push composites support in the storage engine
 -

 Key: CASSANDRA-5417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5417
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 2.0


 CompositeType happens to be very useful and is now widely used: CQL3 heavily 
 rely on it, and super columns are now using it too internally. Besides, 
 CompositeType has been advised as a replacement of super columns on the 
 thrift side for a while, so it's safe to assume that it's generally used 
 there too.
 CompositeType has initially been introduced as just another AbstractType.  
 Meaning that the storage engine has no nothing whatsoever of composites 
 being, well, composite. This has the following drawbacks:
 * Because internally a composite value is handled as just a ByteBuffer, we 
 end up doing a lot of extra work. Typically, each time we compare 2 composite 
 value, we end up deserializing the components (which, while it doesn't copy 
 data per-se because we just slice the global ByteBuffer, still waste some cpu 
 cycles and allocate a bunch of ByteBuffer objects). And since compare can be 
 called *a lot*, this is likely not negligible.
 * This make CQL3 code uglier than necessary. Basically, CQL3 makes extensive 
 use of composites, and since it gets backs ByteBuffer from the internal 
 columns, it always have to check if it's actually a compositeType or not, and 
 then split it and pick the different parts it needs. It's only an API 
 problem, but having things exposed as composites directly would definitively 
 make thinks cleaner. In particular, in most cases, CQL3 don't care whether it 
 has a composite with only one component or a non-really-composite value, but 
 we still always distinguishes both cases.  Lastly, if we do expose composites 
 more directly internally, it's not a lot more work to internalize better 
 the different parts of the cell name that CQL3 uses (what's the clustering 
 key, what's the actuall CQL3 column name, what's the collection element), 
 making things cleaner. Last but not least, there is currently a bunch of 
 places where methods take a ByteBuffer as argument and it's hard to know 
 whether it expects a cell name or a CQL3 column name. This is pretty error 
 prone.
 * It makes it hard (or impossible) to do a number of performance 
 improvements.  Consider CASSANDRA-4175, I'm not really sure how you can do it 
 properly (in memory) if cell names are just ByteBuffer (since CQL3 column 
 names are just one of the component in general). But we also miss 
 oportunities of sharing prefixes. If we were able to share prefixes of 
 

[jira] [Commented] (CASSANDRA-5440) ISE during short reads

2013-04-09 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626897#comment-13626897
 ] 

Brandon Williams commented on CASSANDRA-5440:
-

Bisect says:

{noformat}
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
aa76394764bcb4af54150f12528fed9ddfa66044
fbe99b711aa9be3fcfd1e5e0f37c4d45a1717864
{noformat}

Obviously between these it has to be aa76394764bcb4af54150f12528fed9ddfa66044 
which is CASSANDRA-5403

 ISE during short reads
 --

 Key: CASSANDRA-5440
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5440
 Project: Cassandra
  Issue Type: Bug
Reporter: Brandon Williams
Assignee: Brandon Williams

 On trunk:
 {noformat}
 ERROR [Thrift:2] 2013-04-08 15:06:56,468 ProcessFunction.java (line 41) 
 Internal error processing execute_cql3_query
 java.lang.IllegalStateException
 at java.util.AbstractList$Itr.remove(AbstractList.java:356)
 at 
 org.apache.cassandra.db.filter.SliceQueryFilter.trim(SliceQueryFilter.java:187)
 at 
 org.apache.cassandra.db.SliceFromReadCommand.maybeTrim(SliceFromReadCommand.java:101)
 at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:902)
 at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:831)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:128)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
 at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:130)
 at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:141)
 at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1836)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4232)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4216)
 at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
 at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
 at java.lang.Thread.run(Thread.java:662)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (CASSANDRA-5440) ISE during short reads

2013-04-09 Thread Brandon Williams (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams reassigned CASSANDRA-5440:
---

Assignee: Jonathan Ellis  (was: Brandon Williams)

 ISE during short reads
 --

 Key: CASSANDRA-5440
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5440
 Project: Cassandra
  Issue Type: Bug
Reporter: Brandon Williams
Assignee: Jonathan Ellis

 On trunk:
 {noformat}
 ERROR [Thrift:2] 2013-04-08 15:06:56,468 ProcessFunction.java (line 41) 
 Internal error processing execute_cql3_query
 java.lang.IllegalStateException
 at java.util.AbstractList$Itr.remove(AbstractList.java:356)
 at 
 org.apache.cassandra.db.filter.SliceQueryFilter.trim(SliceQueryFilter.java:187)
 at 
 org.apache.cassandra.db.SliceFromReadCommand.maybeTrim(SliceFromReadCommand.java:101)
 at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:902)
 at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:831)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:128)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
 at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:130)
 at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:141)
 at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1836)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4232)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4216)
 at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
 at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
 at java.lang.Thread.run(Thread.java:662)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5446) Invalid delete statement causes NPE in CQL2

2013-04-09 Thread Jeremiah Jordan (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeremiah Jordan updated CASSANDRA-5446:
---

Affects Version/s: 1.1.10

 Invalid delete statement causes NPE in CQL2
 ---

 Key: CASSANDRA-5446
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5446
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.10
Reporter: Jeremiah Jordan
Priority: Minor

 A bad delete, (no WHERE), causes an NPE in CQL2
 {noformat}
 cqlsh use cfs_archive;
 cqlsh:cfs_archive select * from rules;
 cqlsh:cfs_archive delete from rules;
 TSocket read 0 bytes
 {noformat}
 system.log
 {noformat}
 ERROR [Thrift:6] 2013-04-09 13:18:29,167 CustomTThreadPoolServer.java (line 
 210) Error occurred during processing of message.
 java.lang.NullPointerException
   at 
 org.apache.cassandra.cql.CqlParser.deleteStatement(CqlParser.java:2034)
   at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:303)
   at com.datastax.bdp.server.Cql2Handler.parseQuery(Cql2Handler.java:298)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5446) Invalid delete statement causes NPE in CQL2

2013-04-09 Thread Jeremiah Jordan (JIRA)
Jeremiah Jordan created CASSANDRA-5446:
--

 Summary: Invalid delete statement causes NPE in CQL2
 Key: CASSANDRA-5446
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5446
 Project: Cassandra
  Issue Type: Bug
Reporter: Jeremiah Jordan
Priority: Minor


A bad delete, (no WHERE), causes an NPE in CQL2

{noformat}
cqlsh use cfs_archive;
cqlsh:cfs_archive select * from rules;
cqlsh:cfs_archive delete from rules;
TSocket read 0 bytes
{noformat}

system.log
{noformat}
ERROR [Thrift:6] 2013-04-09 13:18:29,167 CustomTThreadPoolServer.java (line 
210) Error occurred during processing of message.
java.lang.NullPointerException
at 
org.apache.cassandra.cql.CqlParser.deleteStatement(CqlParser.java:2034)
at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:303)
at com.datastax.bdp.server.Cql2Handler.parseQuery(Cql2Handler.java:298)
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5446) Invalid delete statement causes NPE in CQL2

2013-04-09 Thread Jeremiah Jordan (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeremiah Jordan updated CASSANDRA-5446:
---

Description: 
A bad delete, (no WHERE), causes an NPE in CQL2

{noformat}
cqlsh use cfs_archive;
cqlsh:cfs_archive select * from rules;
cqlsh:cfs_archive delete from rules;
TSocket read 0 bytes
{noformat}

system.log
{noformat}
ERROR [Thrift:6] 2013-04-09 13:18:29,167 CustomTThreadPoolServer.java (line 
210) Error occurred during processing of message.
java.lang.NullPointerException
at 
org.apache.cassandra.cql.CqlParser.deleteStatement(CqlParser.java:2034)
at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:303)
at com.datastax.bdp.server.Cql2Handler.parseQuery(Cql2Handler.java:298)
at com.datastax.bdp.server.Cql2Handler.init(Cql2Handler.java:71)
at 
com.datastax.bdp.server.DseServer.makeCqlHandlerForStatement(DseServer.java:934)
at 
com.datastax.bdp.server.DseServer.execute_cql_query(DseServer.java:893)
at 
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3637)
at 
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3625)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
at 
com.datastax.bdp.transport.server.ClientSocketAwareProcessor.process(ClientSocketAwareProcessor.java:25)
at 
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:192)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
{noformat}

  was:
A bad delete, (no WHERE), causes an NPE in CQL2

{noformat}
cqlsh use cfs_archive;
cqlsh:cfs_archive select * from rules;
cqlsh:cfs_archive delete from rules;
TSocket read 0 bytes
{noformat}

system.log
{noformat}
ERROR [Thrift:6] 2013-04-09 13:18:29,167 CustomTThreadPoolServer.java (line 
210) Error occurred during processing of message.
java.lang.NullPointerException
at 
org.apache.cassandra.cql.CqlParser.deleteStatement(CqlParser.java:2034)
at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:303)
at com.datastax.bdp.server.Cql2Handler.parseQuery(Cql2Handler.java:298)
{noformat}


 Invalid delete statement causes NPE in CQL2
 ---

 Key: CASSANDRA-5446
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5446
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.10
Reporter: Jeremiah Jordan
Priority: Minor

 A bad delete, (no WHERE), causes an NPE in CQL2
 {noformat}
 cqlsh use cfs_archive;
 cqlsh:cfs_archive select * from rules;
 cqlsh:cfs_archive delete from rules;
 TSocket read 0 bytes
 {noformat}
 system.log
 {noformat}
 ERROR [Thrift:6] 2013-04-09 13:18:29,167 CustomTThreadPoolServer.java (line 
 210) Error occurred during processing of message.
 java.lang.NullPointerException
   at 
 org.apache.cassandra.cql.CqlParser.deleteStatement(CqlParser.java:2034)
   at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:303)
   at com.datastax.bdp.server.Cql2Handler.parseQuery(Cql2Handler.java:298)
   at com.datastax.bdp.server.Cql2Handler.init(Cql2Handler.java:71)
   at 
 com.datastax.bdp.server.DseServer.makeCqlHandlerForStatement(DseServer.java:934)
   at 
 com.datastax.bdp.server.DseServer.execute_cql_query(DseServer.java:893)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3637)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3625)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 com.datastax.bdp.transport.server.ClientSocketAwareProcessor.process(ClientSocketAwareProcessor.java:25)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:192)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
   at java.lang.Thread.run(Thread.java:680)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5388) Windows unit tests fail due to ant/junit problem

2013-04-09 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626928#comment-13626928
 ] 

Marcus Eriksson commented on CASSANDRA-5388:


i have seen this error with ant 1.9.0 on linux as well, downgrading to 1.8.2 
fixed it (on linux)

 Windows unit tests fail due to ant/junit problem
 

 Key: CASSANDRA-5388
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5388
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0
 Environment: Windows 7
 java 1.7.0_17
 ant 1.9.0
Reporter: Ryan McGuire

 Intermittently, but more often than not I get the following error when 
 running 'ant test' on Windows 7:
 {code}
 BUILD FAILED
 c:\Users\Ryan\git\cassandra3\build.xml:1121: The following error occurred 
 while executing this line:
 c:\Users\Ryan\git\cassandra3\build.xml:1064: Using loader 
 AntClassLoader[C:\Program 
 Files\Java\apache-ant-1.9.0\lib\ant-launcher.jar;c:\Program 
 Files\Java\apache-ant-1.9.0\lib\ant.jar;c:\Program 
 Files\Java\apache-ant-1.9.0\lib\ant-junit.jar;c:\Program 
 

[jira] [Resolved] (CASSANDRA-5446) Invalid delete statement causes NPE in CQL2

2013-04-09 Thread Aleksey Yeschenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko resolved CASSANDRA-5446.
--

Resolution: Won't Fix

 Invalid delete statement causes NPE in CQL2
 ---

 Key: CASSANDRA-5446
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5446
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.10
Reporter: Jeremiah Jordan
Priority: Minor

 A bad delete, (no WHERE), causes an NPE in CQL2
 {noformat}
 cqlsh use cfs_archive;
 cqlsh:cfs_archive select * from rules;
 cqlsh:cfs_archive delete from rules;
 TSocket read 0 bytes
 {noformat}
 system.log
 {noformat}
 ERROR [Thrift:6] 2013-04-09 13:18:29,167 CustomTThreadPoolServer.java (line 
 210) Error occurred during processing of message.
 java.lang.NullPointerException
   at 
 org.apache.cassandra.cql.CqlParser.deleteStatement(CqlParser.java:2034)
   at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:303)
   at com.datastax.bdp.server.Cql2Handler.parseQuery(Cql2Handler.java:298)
   at com.datastax.bdp.server.Cql2Handler.init(Cql2Handler.java:71)
   at 
 com.datastax.bdp.server.DseServer.makeCqlHandlerForStatement(DseServer.java:934)
   at 
 com.datastax.bdp.server.DseServer.execute_cql_query(DseServer.java:893)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3637)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3625)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 com.datastax.bdp.transport.server.ClientSocketAwareProcessor.process(ClientSocketAwareProcessor.java:25)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:192)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
   at java.lang.Thread.run(Thread.java:680)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5447) Include fatal errors in trace events

2013-04-09 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-5447:
-

 Summary: Include fatal errors in trace events
 Key: CASSANDRA-5447
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5447
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Attachments: 5447.txt

This would help tracking down which query is causing errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5447) Include fatal errors in trace events

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-5447:
--

Attachment: 5447.txt

Trivial patch attached.

 Include fatal errors in trace events
 

 Key: CASSANDRA-5447
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5447
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Attachments: 5447.txt


 This would help tracking down which query is causing errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5447) Include fatal errors in trace events

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-5447:
--

  Component/s: Tools
Affects Version/s: 1.2.0
Fix Version/s: 1.2.4

 Include fatal errors in trace events
 

 Key: CASSANDRA-5447
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5447
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.4

 Attachments: 5447.txt


 This would help tracking down which query is causing errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5447) Include fatal errors in trace events

2013-04-09 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626952#comment-13626952
 ] 

Aleksey Yeschenko commented on CASSANDRA-5447:
--

+1

 Include fatal errors in trace events
 

 Key: CASSANDRA-5447
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5447
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.4

 Attachments: 5447.txt


 This would help tracking down which query is causing errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5448) counters upgrade test fails

2013-04-09 Thread Brandon Williams (JIRA)
Brandon Williams created CASSANDRA-5448:
---

 Summary: counters upgrade test fails
 Key: CASSANDRA-5448
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5448
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0
Reporter: Brandon Williams
Assignee: Sylvain Lebresne


{noformat}
Test for bug of #4436 ... FAIL

==
FAIL: Test for bug of #4436
--
Traceback (most recent call last):
  File /srv/cassandra-dtest/counter_tests.py, line 108, in upgrade_test
check(1)
  File /srv/cassandra-dtest/counter_tests.py, line 96, in check
assert row[1] == i * updates, Unexpected value %s % str(row)
AssertionError: Unexpected value [23, 5011]

--
{noformat}

I tested as far back as 1.2.0, so this is pretty old.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[1/2] git commit: Include fatal errors in trace events patch by jbellis; reviewed by aleksey for CASSANDRA-5447

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.2 fd588f622 - 87b350ff7
  refs/heads/trunk ebefb77c6 - 38fdcd198


Include fatal errors in trace events
patch by jbellis; reviewed by aleksey for CASSANDRA-5447


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/87b350ff
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/87b350ff
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/87b350ff

Branch: refs/heads/cassandra-1.2
Commit: 87b350ff777983cdd2f4136c5b649c8dfb11b685
Parents: fd588f6
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 14:09:26 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 14:10:20 2013 -0500

--
 CHANGES.txt|4 
 .../apache/cassandra/service/CassandraDaemon.java  |2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/87b350ff/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 76e5853..0bbc133 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+1.2.5
+ * Include fatal errors in trace events (CASSANDRA-5447)
+
+
 1.2.4
  * Ensure that PerRowSecondaryIndex updates see the most recent values
(CASSANDRA-5397)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/87b350ff/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java 
b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 1eae488..40c453d 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -41,6 +41,7 @@ import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.io.FSError;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.thrift.ThriftServer;
+import org.apache.cassandra.tracing.Tracing;
 import org.apache.cassandra.utils.CLibrary;
 import org.apache.cassandra.utils.Mx4jTool;
 
@@ -172,6 +173,7 @@ public class CassandraDaemon
 {
 exceptions.incrementAndGet();
 logger.error(Exception in thread  + t, e);
+Tracing.trace(Exception in thread  + t, e);
 for (Throwable e2 = e; e2 != null; e2 = e2.getCause())
 {
 // some code, like FileChannel.map, will wrap an 
OutOfMemoryError in another exception



[2/2] git commit: Include fatal errors in trace events patch by jbellis; reviewed by aleksey for CASSANDRA-5447

2013-04-09 Thread jbellis
Include fatal errors in trace events
patch by jbellis; reviewed by aleksey for CASSANDRA-5447


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/38fdcd19
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/38fdcd19
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/38fdcd19

Branch: refs/heads/trunk
Commit: 38fdcd1986d5b8f5bfb9a78cd68b837342ec1d32
Parents: ebefb77
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 14:09:26 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 14:10:42 2013 -0500

--
 CHANGES.txt|5 +
 .../apache/cassandra/service/CassandraDaemon.java  |2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/38fdcd19/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 18c267a..92e61a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -32,6 +32,11 @@
out TreeRequests (CASSANDRA-4932)
  * Add an official way to disable compactions (CASSANDRA-5074)
 
+
+1.2.5
+ * Include fatal errors in trace events (CASSANDRA-5447)
+
+
 1.2.4
  * Ensure that PerRowSecondaryIndex updates see the most recent values
(CASSANDRA-5397)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/38fdcd19/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java 
b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 0d329e7..1d6cb0c 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -44,6 +44,7 @@ import 
org.apache.cassandra.db.compaction.LegacyLeveledManifest;
 import org.apache.cassandra.io.FSError;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.thrift.ThriftServer;
+import org.apache.cassandra.tracing.Tracing;
 import org.apache.cassandra.utils.CLibrary;
 import org.apache.cassandra.utils.Mx4jTool;
 import org.apache.cassandra.utils.Pair;
@@ -176,6 +177,7 @@ public class CassandraDaemon
 {
 exceptions.incrementAndGet();
 logger.error(Exception in thread  + t, e);
+Tracing.trace(Exception in thread  + t, e);
 for (Throwable e2 = e; e2 != null; e2 = e2.getCause())
 {
 // some code, like FileChannel.map, will wrap an 
OutOfMemoryError in another exception



[jira] [Commented] (CASSANDRA-5447) Include fatal errors in trace events

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13626966#comment-13626966
 ] 

Jonathan Ellis commented on CASSANDRA-5447:
---

committed

 Include fatal errors in trace events
 

 Key: CASSANDRA-5447
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5447
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.5

 Attachments: 5447.txt


 This would help tracking down which query is causing errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: ensure that the sstables we unmark compacting, are the same ones we marked

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/trunk 38fdcd198 - a393072aa


ensure that the sstables we unmark compacting, are the same ones we marked


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a393072a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a393072a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a393072a

Branch: refs/heads/trunk
Commit: a393072aac6292412fc465d207c411c4b6b69e0b
Parents: 38fdcd1
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 14:56:54 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 14:56:54 2013 -0500

--
 .../org/apache/cassandra/db/ColumnFamilyStore.java |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a393072a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 3f8b7fc..8dbe52a 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -30,10 +30,7 @@ import javax.management.*;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Function;
-import com.google.common.collect.AbstractIterator;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
+import com.google.common.collect.*;
 import com.google.common.util.concurrent.Futures;
 
 import org.apache.cassandra.db.compaction.*;
@@ -61,6 +58,7 @@ import org.apache.cassandra.db.index.SecondaryIndex;
 import org.apache.cassandra.db.index.SecondaryIndexManager;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.dht.*;
+import org.apache.cassandra.dht.Range;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.io.FSReadError;
 import org.apache.cassandra.io.compress.CompressionParameters;
@@ -1908,7 +1906,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 public IterableSSTableReader call() throws Exception
 {
 assert data.getCompacting().isEmpty() : data.getCompacting();
-IterableSSTableReader sstables = 
AbstractCompactionStrategy.filterSuspectSSTables(getSSTables());
+IterableSSTableReader sstables = 
Lists.newArrayList(AbstractCompactionStrategy.filterSuspectSSTables(getSSTables()));
 if (Iterables.isEmpty(sstables))
 return null;
 boolean success = data.markCompacting(sstables);



buildbot success in ASF Buildbot on cassandra-trunk

2013-04-09 Thread buildbot
The Buildbot has detected a restored build on builder cassandra-trunk while 
building cassandra.
Full details are available at:
 http://ci.apache.org/builders/cassandra-trunk/builds/2548

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch trunk] a393072aac6292412fc465d207c411c4b6b69e0b
Blamelist: Jonathan Ellis jbel...@apache.org

Build succeeded!

sincerely,
 -The Buildbot





[Cassandra Wiki] Trivial Update of FloridaWa by FloridaWa

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The FloridaWa page has been changed by FloridaWa:
http://wiki.apache.org/cassandra/FloridaWa

New page:
[[http://Bigpro.org/|online payday loans]] no fax


git commit: move blacklist tests to another class where closing System.err is less likely to bite us in the ass

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/trunk a393072aa - a5647ad5c


move blacklist tests to another class where closing System.err is less likely 
to bite us in the ass


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a5647ad5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a5647ad5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a5647ad5

Branch: refs/heads/trunk
Commit: a5647ad5c70c3b2bf25ca0901e461ee9bdb41299
Parents: a393072
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 15:18:00 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 15:18:00 2013 -0500

--
 .../db/compaction/BlacklistingCompactionsTest.java |  139 +++
 .../cassandra/db/compaction/CompactionsTest.java   |  108 ---
 2 files changed, 139 insertions(+), 108 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a5647ad5/test/unit/org/apache/cassandra/db/compaction/BlacklistingCompactionsTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/BlacklistingCompactionsTest.java 
b/test/unit/org/apache/cassandra/db/compaction/BlacklistingCompactionsTest.java
new file mode 100644
index 000..fa5d2c0
--- /dev/null
+++ 
b/test/unit/org/apache/cassandra/db/compaction/BlacklistingCompactionsTest.java
@@ -0,0 +1,139 @@
+package org.apache.cassandra.db.compaction;
+
+import java.io.RandomAccessFile;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.Util;
+import org.apache.cassandra.db.ColumnFamilyStore;
+import org.apache.cassandra.db.DecoratedKey;
+import org.apache.cassandra.db.RowMutation;
+import org.apache.cassandra.db.Table;
+import org.apache.cassandra.io.sstable.SSTableReader;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+
+public class BlacklistingCompactionsTest extends SchemaLoader
+{
+public static final String KEYSPACE = Keyspace1;
+
+@BeforeClass
+public static void closeStdErr()
+{
+// These tests generate an error message per CorruptSSTableException 
since it goes through
+// DebuggableThreadPoolExecutor, which will log it in afterExecute.  
We could stop that by
+// creating custom CompactionStrategy and CompactionTask classes, but 
that's kind of a
+// ridiculous amount of effort, especially since those aren't really 
intended to be wrapped
+// like that.
+System.err.close();
+}
+
+@Test
+public void testBlacklistingWithSizeTieredCompactionStrategy() throws 
Exception
+{
+
testBlacklisting(SizeTieredCompactionStrategy.class.getCanonicalName());
+}
+
+@Test
+public void testBlacklistingWithLeveledCompactionStrategy() throws 
Exception
+{
+testBlacklisting(LeveledCompactionStrategy.class.getCanonicalName());
+}
+
+public void testBlacklisting(String compactionStrategy) throws Exception
+{
+// this test does enough rows to force multiple block indexes to be 
used
+Table table = Table.open(KEYSPACE);
+final ColumnFamilyStore cfs = table.getColumnFamilyStore(Standard1);
+
+final int ROWS_PER_SSTABLE = 10;
+final int SSTABLES = cfs.metadata.getIndexInterval() * 2 / 
ROWS_PER_SSTABLE;
+
+cfs.setCompactionStrategyClass(compactionStrategy);
+
+// disable compaction while flushing
+cfs.disableAutoCompaction();
+//test index corruption
+//now create a few new SSTables
+long maxTimestampExpected = Long.MIN_VALUE;
+SetDecoratedKey inserted = new HashSetDecoratedKey();
+for (int j = 0; j  SSTABLES; j++)
+{
+for (int i = 0; i  ROWS_PER_SSTABLE; i++)
+{
+DecoratedKey key = Util.dk(String.valueOf(i % 2));
+RowMutation rm = new RowMutation(KEYSPACE, key.key);
+long timestamp = j * ROWS_PER_SSTABLE + i;
+rm.add(Standard1, ByteBufferUtil.bytes(String.valueOf(i / 
2)),
+   ByteBufferUtil.EMPTY_BYTE_BUFFER,
+   timestamp);
+maxTimestampExpected = Math.max(timestamp, 
maxTimestampExpected);
+rm.apply();
+inserted.add(key);
+}
+cfs.forceBlockingFlush();
+CompactionsTest.assertMaxTimestamp(cfs, maxTimestampExpected);
+assertEquals(inserted.toString(), inserted.size(), 
Util.getRangeSlice(cfs).size());

git commit: r/m unused parameter

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/trunk a5647ad5c - 61bbae106


r/m unused parameter


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/61bbae10
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/61bbae10
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/61bbae10

Branch: refs/heads/trunk
Commit: 61bbae106931499ab24ec6d87fe5d4826efe9e21
Parents: a5647ad
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 15:19:19 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 15:19:19 2013 -0500

--
 .../cassandra/db/compaction/CompactionsTest.java   |   11 +--
 1 files changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/61bbae10/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java 
b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
index 11d7966..fabebe9 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
@@ -42,7 +42,6 @@ import org.apache.cassandra.db.marshal.CompositeType;
 import org.apache.cassandra.io.sstable.Component;
 import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.io.sstable.SSTableScanner;
-import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Pair;
@@ -222,12 +221,12 @@ public class CompactionsTest extends SchemaLoader
 public void testDontPurgeAccidentaly() throws IOException, 
ExecutionException, InterruptedException
 {
 // Testing with and without forcing deserialization. Without 
deserialization, EchoedRow will be used.
-testDontPurgeAccidentaly(test1, Super5, false);
-testDontPurgeAccidentaly(test2, Super5, true);
+testDontPurgeAccidentaly(test1, Super5);
+testDontPurgeAccidentaly(test2, Super5);
 
 // Use CF with gc_grace=0, see last bug of CASSANDRA-2786
-testDontPurgeAccidentaly(test1, SuperDirectGC, false);
-testDontPurgeAccidentaly(test2, SuperDirectGC, true);
+testDontPurgeAccidentaly(test1, SuperDirectGC);
+testDontPurgeAccidentaly(test2, SuperDirectGC);
 }
 
 @Test
@@ -299,7 +298,7 @@ public class CompactionsTest extends SchemaLoader
 assert !compactionLogs.containsKey(Pair.create(TABLE1, cf));
 }
 
-private void testDontPurgeAccidentaly(String k, String cfname, boolean 
forceDeserialize) throws IOException, ExecutionException, InterruptedException
+private void testDontPurgeAccidentaly(String k, String cfname) throws 
IOException, ExecutionException, InterruptedException
 {
 // This test catches the regression of CASSANDRA-2786
 Table table = Table.open(TABLE1);



git commit: remove redundant calls now that EchoedRow is gone

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/trunk 61bbae106 - 2fde93d7e


remove redundant calls now that EchoedRow is gone


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2fde93d7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2fde93d7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2fde93d7

Branch: refs/heads/trunk
Commit: 2fde93d7e8b9a53eb1f913f669f8e6fe9d653b9a
Parents: 61bbae1
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 15:20:29 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 15:20:29 2013 -0500

--
 .../cassandra/db/compaction/CompactionsTest.java   |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2fde93d7/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java 
b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
index fabebe9..218b0fa 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
@@ -220,13 +220,10 @@ public class CompactionsTest extends SchemaLoader
 @Test
 public void testDontPurgeAccidentaly() throws IOException, 
ExecutionException, InterruptedException
 {
-// Testing with and without forcing deserialization. Without 
deserialization, EchoedRow will be used.
 testDontPurgeAccidentaly(test1, Super5);
-testDontPurgeAccidentaly(test2, Super5);
 
 // Use CF with gc_grace=0, see last bug of CASSANDRA-2786
 testDontPurgeAccidentaly(test1, SuperDirectGC);
-testDontPurgeAccidentaly(test2, SuperDirectGC);
 }
 
 @Test



[jira] [Created] (CASSANDRA-5449) Make sstable compacting status un/marking less error-prone

2013-04-09 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-5449:
-

 Summary: Make sstable compacting status un/marking less error-prone
 Key: CASSANDRA-5449
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5449
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Priority: Minor


As demonstrated by a393072aac6292412fc465d207c411c4b6b69e0b, it's easy to 
introduce regressions where we don't unmark the same tables we marked.  This is 
primarily because the marking and unmarking are usually done by separate 
methods.  (The opposite problem is also possible -- performAllSSTableOperation 
unmarks compacting, and so does CompactionTask.execute, which can be part of a 
pASOp via the scrub path.)

I suggest making markCompacting return a callable that will wrap the 
caller-provided code in a try/finally to centralize this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (CASSANDRA-5449) Make sstable compacting status un/marking less error-prone

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis reassigned CASSANDRA-5449:
-

Assignee: Jonathan Ellis

 Make sstable compacting status un/marking less error-prone
 --

 Key: CASSANDRA-5449
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5449
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor

 As demonstrated by a393072aac6292412fc465d207c411c4b6b69e0b, it's easy to 
 introduce regressions where we don't unmark the same tables we marked.  This 
 is primarily because the marking and unmarking are usually done by separate 
 methods.  (The opposite problem is also possible -- 
 performAllSSTableOperation unmarks compacting, and so does 
 CompactionTask.execute, which can be part of a pASOp via the scrub path.)
 I suggest making markCompacting return a callable that will wrap the 
 caller-provided code in a try/finally to centralize this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5449) Make sstable compacting status un/marking less error-prone

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-5449:
--

Fix Version/s: 2.0

 Make sstable compacting status un/marking less error-prone
 --

 Key: CASSANDRA-5449
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5449
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 2.0


 As demonstrated by a393072aac6292412fc465d207c411c4b6b69e0b, it's easy to 
 introduce regressions where we don't unmark the same tables we marked.  This 
 is primarily because the marking and unmarking are usually done by separate 
 methods.  (The opposite problem is also possible -- 
 performAllSSTableOperation unmarks compacting, and so does 
 CompactionTask.execute, which can be part of a pASOp via the scrub path.)
 I suggest making markCompacting return a callable that will wrap the 
 caller-provided code in a try/finally to centralize this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Cassandra Wiki] Trivial Update of LashondaG by LashondaG

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The LashondaG page has been changed by LashondaG:
http://wiki.apache.org/cassandra/LashondaG

New page:
brAstanga, or even on occasion typed ashtanga Yoga will discover these days 
by way of man named Sri Nited kingdom.BR
BR
Pattabhi Jois, through Mysore, Asia. They have added astanga yoga along with 
exercise to the western side concerning Quarter of a century ago on the other 
hand instructs currently throughout 91 years of age. Astanga yoga commenced 
while using the rediscovery on the fantastic article Yoga Korunta.BR
BR
Them describes an original program connected with Hatha yoga exercises since 
applied as well as created by the actual sage Vamana Rishi. It's regarded an 
original asana practiced meant by merely Patanjali.   
[[http://www.ecoactiveyou.com/organic-yoga-clothing-merino-wool-clothes/| 
merino wool clothes]] Even though Atl pre-natal yoga may be quite general in 
the beginning, and many from the poses may appear the identical you can find 
poses which might be produced to turn into useful. Such creates will lower 
numerous real manifestations that happen to be usually triggered with a baby. 
If you're thinking what many of these discomforts is it includes hurting joint 
capsules, tenderness muscle tissues, and also critical back problems.BR
If you choose to apply Atl prenatal yoga you will be able to discover several 
exercises so that you can stretch a number of muscle mass in your body, and a 
lot of of such muscle tissue are being used while in start which enables it to 
assist you to offer an easy a person.BR
brbrBR
BR
brSecond time beginners yoga DVD's are meant for people who know many of the 
essential yoga positions and they are healthy as well as limber enough not to 
ever become stunted by beginner exercises anymore. Advanced beginner Dvd disks 
can have demanding presents which will significantly expand the particular 
muscle tissues and might guide over everything health. Yoga Dvd videos are 
meant to carry the health great things about yoga so that you can someone who 
is interested in mastering the skill variety. Power yoga is often a combination 
of heart exercises and also advanced beginner so that you can sophisticated 
yoga poses that provide the whole entire body feeling of overall health along 
with thrills. brbrBR
BR
brTodays hectic life and long working schedule has made human body prone to 
various ailments including migraine, weakness, anxiety, depression, back pain, 
hip problems and others. With the passage of time, there have been many 
improvements in ergonomics and studies which discover new concepts about the 
relationship of prolonged sitting to specific health problems.According to a 
recent study it has been studied that office workers are more prone of 
developing blood clots. It is advisable to take all the precautionary measures 
before jumping to any conclusion. It is your body and its care must be taken by 
yourself only.Corporate yoga is found to be extremely useful in helping people 
stay away from these ailments. There are numerous organizations that have 
started paying attention to the health of their employees and subscribed to 
various yoga gurus to bring a more health work force. A short yoga session can 
help individuals release muscle stiffness and alleviate the regular pains and 
aches, which result from prolonged sitting.BR
http://matchnepal.com/Penney37KBR
http://www.itscholarshipforum.com/members/jaydenrei/activity/186190BR
http://mektuparkadasim.com/groups/what-is-organic-cotton/BR
http://alumni.avance.org/index.php?do=/blog/9577/merino-wool-clothing-ontario/BR
brbrBR
BR
Here is my web blog - 
[[http://www.10feb.com/index.php?do=/blog/45637/organic-cotton-yoga-clothing-women/|http://www.10feb.com/]]


[jira] [Commented] (CASSANDRA-3919) Dropping a column should do more than just remove the definition

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627124#comment-13627124
 ] 

Jonathan Ellis commented on CASSANDRA-3919:
---

Why do we only call discardDropped if it has re-added columns?

Why is the dropped time the last part of the cell name?  Isn't it the value as 
well?  That seems odd.  Nit: would prefer to store the values natively as 
micros rather than fix it up on load into CFMD.

Nit 2: {{!cf.metadata().getDroppedColumns().isEmpty()}} could move into 
isDropped.

Leaning towards we should probably not put this into 1.2 this late in the 
release cycle, is it going to kill people to wait for 2.0?

 Dropping a column should do more than just remove the definition
 

 Key: CASSANDRA-3919
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: compaction, cql
 Fix For: 1.2.5


 Dropping a column should:
 - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
 - eventually (i.e., post-compaction) reclaim the space formerly used by that 
 column

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5440) ISE during short reads

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-5440:
--

Attachment: 5440.txt

patch attached.

 ISE during short reads
 --

 Key: CASSANDRA-5440
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5440
 Project: Cassandra
  Issue Type: Bug
Reporter: Brandon Williams
Assignee: Jonathan Ellis
 Attachments: 5440.txt


 On trunk:
 {noformat}
 ERROR [Thrift:2] 2013-04-08 15:06:56,468 ProcessFunction.java (line 41) 
 Internal error processing execute_cql3_query
 java.lang.IllegalStateException
 at java.util.AbstractList$Itr.remove(AbstractList.java:356)
 at 
 org.apache.cassandra.db.filter.SliceQueryFilter.trim(SliceQueryFilter.java:187)
 at 
 org.apache.cassandra.db.SliceFromReadCommand.maybeTrim(SliceFromReadCommand.java:101)
 at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:902)
 at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:831)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:128)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
 at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:130)
 at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:141)
 at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1836)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4232)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4216)
 at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
 at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
 at java.lang.Thread.run(Thread.java:662)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5440) ISE during short reads

2013-04-09 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627147#comment-13627147
 ] 

Brandon Williams commented on CASSANDRA-5440:
-

+1

 ISE during short reads
 --

 Key: CASSANDRA-5440
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5440
 Project: Cassandra
  Issue Type: Bug
Reporter: Brandon Williams
Assignee: Jonathan Ellis
 Attachments: 5440.txt


 On trunk:
 {noformat}
 ERROR [Thrift:2] 2013-04-08 15:06:56,468 ProcessFunction.java (line 41) 
 Internal error processing execute_cql3_query
 java.lang.IllegalStateException
 at java.util.AbstractList$Itr.remove(AbstractList.java:356)
 at 
 org.apache.cassandra.db.filter.SliceQueryFilter.trim(SliceQueryFilter.java:187)
 at 
 org.apache.cassandra.db.SliceFromReadCommand.maybeTrim(SliceFromReadCommand.java:101)
 at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:902)
 at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:831)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:128)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
 at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:130)
 at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:141)
 at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1836)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4232)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4216)
 at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
 at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
 at java.lang.Thread.run(Thread.java:662)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Cassandra Wiki] Update of PerformanceTuning by MarkWatson

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The PerformanceTuning page has been changed by MarkWatson:
http://wiki.apache.org/cassandra/PerformanceTuning?action=diffrev1=7rev2=8

Comment:
Added clarification for Dcassandra.compaction.priority

  -XX:ThreadPriorityPolicy=42 \
  -Dcassandra.compaction.priority=1 \
  }}}
+ 
+ The above option for setting the compaction priority 
(-Dcassandra.compaction.priority=1) is out of date as of 1.0. See the options 
for controlling compaction settings in the cassandra yaml configuration for 
details. The above code was originally pulled from: 
https://issues.apache.org/jira/browse/CASSANDRA-1181
+ 
+ 
  === Useful JVM options ===
  {{{
  -XX:+UseCompressedOops # enables compressed references, reducing memory 
overhead on 64bit JVMs


[jira] [Commented] (CASSANDRA-3919) Dropping a column should do more than just remove the definition

2013-04-09 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627157#comment-13627157
 ] 

Aleksey Yeschenko commented on CASSANDRA-3919:
--

bq. Why do we only call discardDropped if it has re-added columns?

SelectStatement will reject unknown columns, so there is no need to do 
extra-filtering unless some have been readded.

bq. Why is the dropped time the last part of the cell name? Isn't it the value 
as well? That seems odd.

It's only in the value:
https://github.com/iamaleksey/cassandra/blob/64f8b93ef8a61ea4beb93485458bc76a1af803c6/src/java/org/apache/cassandra/config/CFMetaData.java#L1388

bq. Would prefer to store the values natively as micros rather than fix it up 
on load into CFMD.

wfm, I just liked having it nicely-formatted in cqlsh.

bq. !cf.metadata().getDroppedColumns().isEmpty() could move into isDropped

Huh. Yes, it should. Or I could move it outside the while-loop.

bq. Leaning towards we should probably not put this into 1.2 this late in the 
release cycle, is it going to kill people to wait for 2.0?

+1


 Dropping a column should do more than just remove the definition
 

 Key: CASSANDRA-3919
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: compaction, cql
 Fix For: 1.2.5


 Dropping a column should:
 - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
 - eventually (i.e., post-compaction) reclaim the space formerly used by that 
 column

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[2/5] git commit: Include fatal errors in trace events patch by jbellis; reviewed by aleksey for CASSANDRA-5447

2013-04-09 Thread jbellis
Include fatal errors in trace events
patch by jbellis; reviewed by aleksey for CASSANDRA-5447


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/87b350ff
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/87b350ff
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/87b350ff

Branch: refs/heads/trunk
Commit: 87b350ff777983cdd2f4136c5b649c8dfb11b685
Parents: fd588f6
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 14:09:26 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 14:10:20 2013 -0500

--
 CHANGES.txt|4 
 .../apache/cassandra/service/CassandraDaemon.java  |2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/87b350ff/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 76e5853..0bbc133 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+1.2.5
+ * Include fatal errors in trace events (CASSANDRA-5447)
+
+
 1.2.4
  * Ensure that PerRowSecondaryIndex updates see the most recent values
(CASSANDRA-5397)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/87b350ff/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java 
b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 1eae488..40c453d 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -41,6 +41,7 @@ import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.io.FSError;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.thrift.ThriftServer;
+import org.apache.cassandra.tracing.Tracing;
 import org.apache.cassandra.utils.CLibrary;
 import org.apache.cassandra.utils.Mx4jTool;
 
@@ -172,6 +173,7 @@ public class CassandraDaemon
 {
 exceptions.incrementAndGet();
 logger.error(Exception in thread  + t, e);
+Tracing.trace(Exception in thread  + t, e);
 for (Throwable e2 = e; e2 != null; e2 = e2.getCause())
 {
 // some code, like FileChannel.map, will wrap an 
OutOfMemoryError in another exception



[1/5] git commit: Stop calling the binary proto spec a draft since we've released it

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.2 87b350ff7 - c7eb146e5
  refs/heads/trunk 2fde93d7e - a751d04d7


Stop calling the binary proto spec a draft since we've released it


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fd588f62
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd588f62
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd588f62

Branch: refs/heads/trunk
Commit: fd588f62278ca9e0399ab7b23596d9cbd6b02adf
Parents: c5820ed
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Apr 9 17:27:39 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Apr 9 17:27:47 2013 +0200

--
 doc/native_protocol.spec |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd588f62/doc/native_protocol.spec
--
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index 7d0d07b..fb709e3 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -1,6 +1,6 @@
 
  CQL BINARY PROTOCOL v1
-(draft)
+
 
 Table of Contents
 



[4/5] git commit: Ensure that PerRowSecondaryIndex is notified of row-level deletes patch by Sam Tunnicliffe; reviewed by jbellis for CASSANDRA-5445

2013-04-09 Thread jbellis
Ensure that PerRowSecondaryIndex is notified of row-level deletes
patch by Sam Tunnicliffe; reviewed by jbellis for CASSANDRA-5445


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c7eb146e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c7eb146e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c7eb146e

Branch: refs/heads/cassandra-1.2
Commit: c7eb146e5669a8e97b1997ce9860b769a3cc7b32
Parents: 87b350f
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 16:48:29 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 16:48:29 2013 -0500

--
 CHANGES.txt|2 +
 .../apache/cassandra/db/AtomicSortedColumns.java   |2 +-
 src/java/org/apache/cassandra/db/Table.java|2 +-
 .../db/compaction/LazilyCompactedRow.java  |2 +-
 .../db/compaction/ParallelCompactionIterable.java  |2 +-
 .../cassandra/db/compaction/PrecompactedRow.java   |4 +-
 .../cassandra/db/index/SecondaryIndexManager.java  |   93 ++-
 test/unit/org/apache/cassandra/SchemaLoader.java   |2 +-
 .../db/index/PerRowSecondaryIndexTest.java |   55 +
 9 files changed, 75 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 0bbc133..32aba15 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 1.2.5
  * Include fatal errors in trace events (CASSANDRA-5447)
+ * Ensure that PerRowSecondaryIndex is notified of row-level deletes
+   (CASSANDRA-5445)
 
 
 1.2.4

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
--
diff --git a/src/java/org/apache/cassandra/db/AtomicSortedColumns.java 
b/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
index 552ad6a..bdb2168 100644
--- a/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
+++ b/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
@@ -195,7 +195,7 @@ public class AtomicSortedColumns implements ISortedColumns
 }
 while (!ref.compareAndSet(current, modified));
 
-indexer.commit();
+indexer.updateRowLevelIndexes();
 
 return sizeDelta;
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/src/java/org/apache/cassandra/db/Table.java
--
diff --git a/src/java/org/apache/cassandra/db/Table.java 
b/src/java/org/apache/cassandra/db/Table.java
index c718586..17c510b 100644
--- a/src/java/org/apache/cassandra/db/Table.java
+++ b/src/java/org/apache/cassandra/db/Table.java
@@ -387,7 +387,7 @@ public class Table
 }
 
 Tracing.trace(Adding to {} memtable, cf.metadata().cfName);
-cfs.apply(key, cf, updateIndexes ? 
cfs.indexManager.updaterFor(key, true) : SecondaryIndexManager.nullUpdater);
+cfs.apply(key, cf, updateIndexes ? 
cfs.indexManager.updaterFor(key) : SecondaryIndexManager.nullUpdater);
 }
 }
 finally

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java 
b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
index 8d59898..22f5413 100644
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -71,7 +71,7 @@ public class LazilyCompactedRow extends AbstractCompactedRow 
implements Iterable
 super(rows.get(0).getKey());
 this.rows = rows;
 this.controller = controller;
-indexer = controller.cfs.indexManager.updaterFor(key, false);
+indexer = controller.cfs.indexManager.updaterFor(key);
 
 long maxDelTimestamp = Long.MIN_VALUE;
 for (OnDiskAtomIterator row : rows)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java 
b/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
index 091b247..225393e 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
+++ 

[3/5] git commit: Ensure that PerRowSecondaryIndex is notified of row-level deletes patch by Sam Tunnicliffe; reviewed by jbellis for CASSANDRA-5445

2013-04-09 Thread jbellis
Ensure that PerRowSecondaryIndex is notified of row-level deletes
patch by Sam Tunnicliffe; reviewed by jbellis for CASSANDRA-5445


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c7eb146e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c7eb146e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c7eb146e

Branch: refs/heads/trunk
Commit: c7eb146e5669a8e97b1997ce9860b769a3cc7b32
Parents: 87b350f
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 16:48:29 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 16:48:29 2013 -0500

--
 CHANGES.txt|2 +
 .../apache/cassandra/db/AtomicSortedColumns.java   |2 +-
 src/java/org/apache/cassandra/db/Table.java|2 +-
 .../db/compaction/LazilyCompactedRow.java  |2 +-
 .../db/compaction/ParallelCompactionIterable.java  |2 +-
 .../cassandra/db/compaction/PrecompactedRow.java   |4 +-
 .../cassandra/db/index/SecondaryIndexManager.java  |   93 ++-
 test/unit/org/apache/cassandra/SchemaLoader.java   |2 +-
 .../db/index/PerRowSecondaryIndexTest.java |   55 +
 9 files changed, 75 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 0bbc133..32aba15 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 1.2.5
  * Include fatal errors in trace events (CASSANDRA-5447)
+ * Ensure that PerRowSecondaryIndex is notified of row-level deletes
+   (CASSANDRA-5445)
 
 
 1.2.4

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
--
diff --git a/src/java/org/apache/cassandra/db/AtomicSortedColumns.java 
b/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
index 552ad6a..bdb2168 100644
--- a/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
+++ b/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
@@ -195,7 +195,7 @@ public class AtomicSortedColumns implements ISortedColumns
 }
 while (!ref.compareAndSet(current, modified));
 
-indexer.commit();
+indexer.updateRowLevelIndexes();
 
 return sizeDelta;
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/src/java/org/apache/cassandra/db/Table.java
--
diff --git a/src/java/org/apache/cassandra/db/Table.java 
b/src/java/org/apache/cassandra/db/Table.java
index c718586..17c510b 100644
--- a/src/java/org/apache/cassandra/db/Table.java
+++ b/src/java/org/apache/cassandra/db/Table.java
@@ -387,7 +387,7 @@ public class Table
 }
 
 Tracing.trace(Adding to {} memtable, cf.metadata().cfName);
-cfs.apply(key, cf, updateIndexes ? 
cfs.indexManager.updaterFor(key, true) : SecondaryIndexManager.nullUpdater);
+cfs.apply(key, cf, updateIndexes ? 
cfs.indexManager.updaterFor(key) : SecondaryIndexManager.nullUpdater);
 }
 }
 finally

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java 
b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
index 8d59898..22f5413 100644
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -71,7 +71,7 @@ public class LazilyCompactedRow extends AbstractCompactedRow 
implements Iterable
 super(rows.get(0).getKey());
 this.rows = rows;
 this.controller = controller;
-indexer = controller.cfs.indexManager.updaterFor(key, false);
+indexer = controller.cfs.indexManager.updaterFor(key);
 
 long maxDelTimestamp = Long.MIN_VALUE;
 for (OnDiskAtomIterator row : rows)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7eb146e/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java 
b/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
index 091b247..225393e 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
+++ 

[5/5] git commit: merge from 1.2

2013-04-09 Thread jbellis
merge from 1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a751d04d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a751d04d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a751d04d

Branch: refs/heads/trunk
Commit: a751d04d7d0e5e96ea7cee79093e090836ca0f5e
Parents: 2fde93d c7eb146
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 16:55:07 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 16:55:07 2013 -0500

--
 CHANGES.txt|2 +
 doc/native_protocol.spec   |2 +-
 .../apache/cassandra/db/AtomicSortedColumns.java   |2 +-
 src/java/org/apache/cassandra/db/Table.java|2 +-
 .../db/compaction/LazilyCompactedRow.java  |2 +-
 .../db/compaction/ParallelCompactionIterable.java  |2 +-
 .../cassandra/db/compaction/PrecompactedRow.java   |4 +-
 .../cassandra/db/index/SecondaryIndexManager.java  |  101 +++
 test/unit/org/apache/cassandra/SchemaLoader.java   |2 +-
 .../db/index/PerRowSecondaryIndexTest.java |   55 
 10 files changed, 82 insertions(+), 92 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a751d04d/CHANGES.txt
--
diff --cc CHANGES.txt
index 92e61a8,32aba15..75c9979
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,40 -1,7 +1,42 @@@
 +2.0
 + * Leveled compaction performs size-tiered compactions in L0 (CASSANDRA-5371)
 + * Add yaml network topology snitch for mixed ec2/other envs (CASSANDRA-5339)
 + * Log when a node is down longer than the hint window (CASSANDRA-4554)
 + * Optimize tombstone creation for ExpiringColumns (CASSANDRA-4917)
 + * Improve LeveledScanner work estimation (CASSANDRA-5250, 5407)
 + * Replace compaction lock with runWithCompactionsDisabled (CASSANDRA-3430)
 + * Change Message IDs to ints (CASSANDRA-5307)
 + * Move sstable level information into the Stats component, removing the
 +   need for a separate Manifest file (CASSANDRA-4872)
 + * avoid serializing to byte[] on commitlog append (CASSANDRA-5199)
 + * make index_interval configurable per columnfamily (CASSANDRA-3961)
 + * add default_time_to_live (CASSANDRA-3974)
 + * add memtable_flush_period_in_ms (CASSANDRA-4237)
 + * replace supercolumns internally by composites (CASSANDRA-3237, 5123)
 + * upgrade thrift to 0.9.0 (CASSANDRA-3719)
 + * drop unnecessary keyspace parameter from user-defined compaction API 
 +   (CASSANDRA-5139)
 + * more robust solution to incomplete compactions + counters (CASSANDRA-5151)
 + * Change order of directory searching for c*.in.sh (CASSANDRA-3983)
 + * Add tool to reset SSTable compaction level for LCS (CASSANDRA-5271)
 + * Allow custom configuration loader (CASSANDRA-5045)
 + * Remove memory emergency pressure valve logic (CASSANDRA-3534)
 + * Reduce request latency with eager retry (CASSANDRA-4705)
 + * cqlsh: Remove ASSUME command (CASSANDRA-5331)
 + * Rebuild BF when loading sstables if bloom_filter_fp_chance
 +   has changed since compaction (CASSANDRA-5015)
 + * remove row-level bloom filters (CASSANDRA-4885)
 + * Change Kernel Page Cache skipping into row preheating (disabled by default)
 +   (CASSANDRA-4937)
 + * Improve repair by deciding on a gcBefore before sending
 +   out TreeRequests (CASSANDRA-4932)
 + * Add an official way to disable compactions (CASSANDRA-5074)
 +
 +
  1.2.5
   * Include fatal errors in trace events (CASSANDRA-5447)
+  * Ensure that PerRowSecondaryIndex is notified of row-level deletes
+(CASSANDRA-5445)
  
  
  1.2.4

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a751d04d/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a751d04d/src/java/org/apache/cassandra/db/Table.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a751d04d/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a751d04d/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a751d04d/src/java/org/apache/cassandra/db/compaction/PrecompactedRow.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a751d04d/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java

buildbot failure in ASF Buildbot on cassandra-trunk

2013-04-09 Thread buildbot
The Buildbot has detected a new failure on builder cassandra-trunk while 
building cassandra.
Full details are available at:
 http://ci.apache.org/builders/cassandra-trunk/builds/2550

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch trunk] a751d04d7d0e5e96ea7cee79093e090836ca0f5e
Blamelist: Jonathan Ellis jbel...@apache.org,Sylvain Lebresne 
sylv...@datastax.com

BUILD FAILED: failed compile

sincerely,
 -The Buildbot





git commit: fix merge

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/trunk a751d04d7 - 162675983


fix merge


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/16267598
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/16267598
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/16267598

Branch: refs/heads/trunk
Commit: 162675983c0a41edd29220e6cbc061f04830142b
Parents: a751d04
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 17:00:37 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 17:00:37 2013 -0500

--
 .../cassandra/db/index/SecondaryIndexManager.java  |9 --
 .../db/index/PerRowSecondaryIndexTest.java |   24 +++---
 2 files changed, 18 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/16267598/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 6859c81..f949823 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -608,9 +608,12 @@ public class SecondaryIndexManager
 {
 for (SecondaryIndex index : indexFor(column.name()))
 {
-((PerColumnSecondaryIndex) index).delete(key.key, oldColumn);
-if (!column.isMarkedForDelete())
-((PerColumnSecondaryIndex) index).insert(key.key, column);
+if (index instanceof PerColumnSecondaryIndex)
+{
+((PerColumnSecondaryIndex) index).delete(key.key, 
oldColumn);
+if (!column.isMarkedForDelete())
+((PerColumnSecondaryIndex) index).insert(key.key, 
column);
+}
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/16267598/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java 
b/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
index a4f97fe..44bf6a1 100644
--- a/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
+++ b/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
@@ -18,6 +18,14 @@
 package org.apache.cassandra.db.index;
 
 
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Test;
+
 import org.apache.cassandra.SchemaLoader;
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.db.*;
@@ -25,14 +33,6 @@ import org.apache.cassandra.db.filter.QueryFilter;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.Set;
-
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -82,13 +82,13 @@ public class PerRowSecondaryIndexTest extends SchemaLoader
 // issue a column delete and test that the configured index instance 
was notified to update
 RowMutation rm;
 rm = new RowMutation(PerRowSecondaryIndex, 
ByteBufferUtil.bytes(k2));
-rm.delete(new QueryPath(Indexed1, null, 
ByteBufferUtil.bytes(indexed)), 1);
+rm.delete(Indexed1, ByteBufferUtil.bytes(indexed), 1);
 rm.apply();
 
 ColumnFamily indexedRow = TestIndex.LAST_INDEXED_ROW;
 assertNotNull(indexedRow);
 
-for (IColumn column : indexedRow.getSortedColumns())
+for (Column column : indexedRow.getSortedColumns())
 {
 assertTrue(column.isMarkedForDelete());
 }
@@ -101,12 +101,12 @@ public class PerRowSecondaryIndexTest extends SchemaLoader
 // issue a row level delete and test that the configured index 
instance was notified to update
 RowMutation rm;
 rm = new RowMutation(PerRowSecondaryIndex, 
ByteBufferUtil.bytes(k3));
-rm.delete(new QueryPath(Indexed1), 1);
+rm.delete(Indexed1, 1);
 rm.apply();
 
 ColumnFamily indexedRow = TestIndex.LAST_INDEXED_ROW;
 assertNotNull(indexedRow);
-for (IColumn column : indexedRow.getSortedColumns())
+for (Column column : indexedRow.getSortedColumns())
 {
 

[jira] [Updated] (CASSANDRA-3919) Dropping a column should do more than just remove the definition

2013-04-09 Thread Aleksey Yeschenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-3919:
-

Fix Version/s: (was: 1.2.5)
   2.0

 Dropping a column should do more than just remove the definition
 

 Key: CASSANDRA-3919
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: compaction, cql
 Fix For: 2.0


 Dropping a column should:
 - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
 - eventually (i.e., post-compaction) reclaim the space formerly used by that 
 column

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: call iter.next before iter.remove patch by jbellis; reviewed by brandonwilliams for CASSANDRA-5440

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/trunk 162675983 - 08b2bc596


call iter.next before iter.remove
patch by jbellis; reviewed by brandonwilliams for CASSANDRA-5440


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/08b2bc59
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/08b2bc59
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/08b2bc59

Branch: refs/heads/trunk
Commit: 08b2bc5963a8732b5444f42ee421f15df9c838ea
Parents: 1626759
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 17:04:57 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 17:04:57 2013 -0500

--
 .../cassandra/db/filter/SliceQueryFilter.java  |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/08b2bc59/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
--
diff --git a/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java 
b/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
index d428883..48a7a39 100644
--- a/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
@@ -184,7 +184,10 @@ public class SliceQueryFilter implements IDiskAtomFilter
 {
 iter.remove();
 while (iter.hasNext())
+{
+iter.next();
 iter.remove();
+}
 }
 }
 }



[jira] [Resolved] (CASSANDRA-5440) ISE during short reads

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis resolved CASSANDRA-5440.
---

Resolution: Fixed
  Reviewer: brandon.williams

committed

 ISE during short reads
 --

 Key: CASSANDRA-5440
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5440
 Project: Cassandra
  Issue Type: Bug
Reporter: Brandon Williams
Assignee: Jonathan Ellis
 Attachments: 5440.txt


 On trunk:
 {noformat}
 ERROR [Thrift:2] 2013-04-08 15:06:56,468 ProcessFunction.java (line 41) 
 Internal error processing execute_cql3_query
 java.lang.IllegalStateException
 at java.util.AbstractList$Itr.remove(AbstractList.java:356)
 at 
 org.apache.cassandra.db.filter.SliceQueryFilter.trim(SliceQueryFilter.java:187)
 at 
 org.apache.cassandra.db.SliceFromReadCommand.maybeTrim(SliceFromReadCommand.java:101)
 at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:902)
 at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:831)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:128)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
 at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:130)
 at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:141)
 at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1836)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4232)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4216)
 at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
 at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
 at java.lang.Thread.run(Thread.java:662)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5440) ISE during short reads

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-5440:
--

Affects Version/s: 2.0
Fix Version/s: 2.0

 ISE during short reads
 --

 Key: CASSANDRA-5440
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5440
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0
Reporter: Brandon Williams
Assignee: Jonathan Ellis
 Fix For: 2.0

 Attachments: 5440.txt


 On trunk:
 {noformat}
 ERROR [Thrift:2] 2013-04-08 15:06:56,468 ProcessFunction.java (line 41) 
 Internal error processing execute_cql3_query
 java.lang.IllegalStateException
 at java.util.AbstractList$Itr.remove(AbstractList.java:356)
 at 
 org.apache.cassandra.db.filter.SliceQueryFilter.trim(SliceQueryFilter.java:187)
 at 
 org.apache.cassandra.db.SliceFromReadCommand.maybeTrim(SliceFromReadCommand.java:101)
 at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:902)
 at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:831)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:128)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
 at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:130)
 at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:141)
 at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1836)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4232)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4216)
 at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
 at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
 at java.lang.Thread.run(Thread.java:662)
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-3919) Dropping a column should do more than just remove the definition

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627185#comment-13627185
 ] 

Jonathan Ellis commented on CASSANDRA-3919:
---

bq. SelectStatement will reject unknown columns, so there is no need to do 
extra-filtering unless some have been readded.

Don't we do slice-based queries for multiple cql rows w/in a partition though?

bq. It's only in the value

What's up with getLastComponent then?

 Dropping a column should do more than just remove the definition
 

 Key: CASSANDRA-3919
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: compaction, cql
 Fix For: 2.0


 Dropping a column should:
 - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
 - eventually (i.e., post-compaction) reclaim the space formerly used by that 
 column

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


buildbot success in ASF Buildbot on cassandra-trunk

2013-04-09 Thread buildbot
The Buildbot has detected a restored build on builder cassandra-trunk while 
building cassandra.
Full details are available at:
 http://ci.apache.org/builders/cassandra-trunk/builds/2551

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch trunk] 162675983c0a41edd29220e6cbc061f04830142b
Blamelist: Jonathan Ellis jbel...@apache.org

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Commented] (CASSANDRA-3919) Dropping a column should do more than just remove the definition

2013-04-09 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627194#comment-13627194
 ] 

Aleksey Yeschenko commented on CASSANDRA-3919:
--

Now you lost me.

bq. What's up with getLastComponent then?

Can you give me a link (with a line/no) to what you mean?

bq. Don't we do slice-based queries for multiple cql rows w/in a partition 
though?

How is it important?

 Dropping a column should do more than just remove the definition
 

 Key: CASSANDRA-3919
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: compaction, cql
 Fix For: 2.0


 Dropping a column should:
 - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
 - eventually (i.e., post-compaction) reclaim the space formerly used by that 
 column

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Cassandra Wiki] Trivial Update of DerickGoo by DerickGoo

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The DerickGoo page has been changed by DerickGoo:
http://wiki.apache.org/cassandra/DerickGoo

New page:
The individual that wrote the article is called Elliott Kresge.BR
BR
His job is a postal service worker but soon he'll be on his unique. One of his 
favorite hobbies is cooking and he's been doing it for quite a little extra 
time. Wyoming is where he and his wife live but his wife wants your crooks to 
move.BR
BR
My web blog; 
[[http://www.planet-thin.com/african-mango-debunking-the-myths-from-reality/|african
 mango reviews]]


[jira] [Commented] (CASSANDRA-3919) Dropping a column should do more than just remove the definition

2013-04-09 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627265#comment-13627265
 ] 

Aleksey Yeschenko commented on CASSANDRA-3919:
--

K, I think I see how Why do we only call discardDropped if it has re-added 
columns? is valid. The other thing is most likely wrong, though.

Will push a new, trunk-based, branch tomorrow.

 Dropping a column should do more than just remove the definition
 

 Key: CASSANDRA-3919
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: compaction, cql
 Fix For: 2.0


 Dropping a column should:
 - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
 - eventually (i.e., post-compaction) reclaim the space formerly used by that 
 column

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Cassandra Wiki] Trivial Update of KarlGea by KarlGea

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The KarlGea page has been changed by KarlGea:
http://wiki.apache.org/cassandra/KarlGea

New page:
Nothing to tell about myself really.BR
Nice to be here and a part of this community.BR
I just wish Im useful in some way .BR
BR
My webpage :: 
[[http://www.pbscspace.com/index.php?do=/blog/18404/car-insurance-for-teens/|car
 insurance quotes ny]]


[Cassandra Wiki] Trivial Update of Aisha79M by Aisha79M

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The Aisha79M page has been changed by Aisha79M:
http://wiki.apache.org/cassandra/Aisha79M

New page:
Name: Quentin FitchBR
My age: 36BR
Country: Great BritainBR
Town: Shear Cross BR
ZIP: BA12 6ZEBR
Address: 25 Kendell StreetBR
BR
my webpage 
[[http://bandtoady.com/blogs/entry/Tips-On-How-To-Get-Cheap-Car-Insurance-Rates|simply
 click the up coming internet site]]


[Cassandra Wiki] Trivial Update of Elden8055 by Elden8055

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The Elden8055 page has been changed by Elden8055:
http://wiki.apache.org/cassandra/Elden8055

New page:
My name is Crystle Alvarez. I life in Haid (Austria).BR
BR
BR
Also visit my page: 
[[http://faucet17locket.bravejournal.com/entry/124964|ginecologie]]


[jira] [Commented] (CASSANDRA-4463) Nodes Don't Restart: Assertion Error on Serializing Cache provider

2013-04-09 Thread Dave Brosius (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627325#comment-13627325
 ] 

Dave Brosius commented on CASSANDRA-4463:
-

extraneous semi at end of line.

do you want to increment cachedRowsRead if the data is null?

otherwise +1

 Nodes Don't Restart: Assertion Error on Serializing Cache provider
 --

 Key: CASSANDRA-4463
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4463
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
 Environment: Ubuntu 12.04 Precise
 Cassandra 1.1.5
 Oracle Java 6
Reporter: Arya Goudarzi
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.1.11

 Attachments: 4463.txt


 I stopped Cassandra on one of our 1.1.2 nodes and I couldn't start it any 
 more. System.log didn't have much useful info but output.log had this:
 java.lang.AssertionError
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:43)
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:39)
 at 
 org.apache.cassandra.cache.SerializingCache.serialize(SerializingCache.java:116)
 at 
 org.apache.cassandra.cache.SerializingCache.put(SerializingCache.java:174)
 at 
 org.apache.cassandra.cache.InstrumentingCache.put(InstrumentingCache.java:45)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.initRowCache(ColumnFamilyStore.java:430)
 at org.apache.cassandra.db.Table.open(Table.java:124)
 at org.apache.cassandra.db.Table.open(Table.java:97)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:204)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.init(AbstractCassandraDaemon.java:254)
 at 
 com.netflix.priam.cassandra.NFThinCassandraDaemon.init(NFThinCassandraDaemon.java:41)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:212)
 Cannot load daemon
 Service exit with a return value of 3
 Deleting the stuff in saved_caches folder fixed the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5062) Support CAS

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627378#comment-13627378
 ] 

Jonathan Ellis commented on CASSANDRA-5062:
---

bq. it feels to me that having one paxos state per row is more natural

All right.  Done and pushed.

bq. I think that we may want to TTL the Paxos state

Hmm, not sure where to fit this in.  We store gcgs in the schema, but system 
tables are not user-modifiable (and even if they were, this one is node-local). 
 I guess we could add a global config setting, which doesn't thrill me.

bq. the current patch can get in a state where for a row no CAS operation on 
that row can be done at all (they will all UAE) until the user does a manual 
repair, because if less than a quorum of replica have received the last MRC 
commit message

I must be missing something, because that's by design -- this sounds exactly 
like what we discussed to preserve correctness. On result of the prepare, we 
would wait for a quorum of people agreeing on the last MRC (i.e. a quorum has 
learn the last value) before allowing to proceed with our own value.


 Support CAS
 ---

 Key: CASSANDRA-5062
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5062
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 2.0

 Attachments: half-baked commit 1.jpg, half-baked commit 2.jpg, 
 half-baked commit 3.jpg


 Strong consistency is not enough to prevent race conditions.  The classic 
 example is user account creation: we want to ensure usernames are unique, so 
 we only want to signal account creation success if nobody else has created 
 the account yet.  But naive read-then-write allows clients to race and both 
 think they have a green light to create.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[1/2] git commit: rename store - cfs

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/trunk 08b2bc596 - 6f8d73711


rename store - cfs


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2c35a5d3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2c35a5d3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2c35a5d3

Branch: refs/heads/trunk
Commit: 2c35a5d36681caf80de916c0ab6a90061d5bf87e
Parents: 08b2bc5
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 21:03:50 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 21:04:09 2013 -0500

--
 .../compaction/LeveledCompactionStrategyTest.java  |   43 +++
 1 files changed, 20 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c35a5d3/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
 
b/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
index f4fd960..9760c7e 100644
--- 
a/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
+++ 
b/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
@@ -49,7 +49,7 @@ import static org.junit.Assert.assertTrue;
 public class LeveledCompactionStrategyTest extends SchemaLoader
 {
 /*
- * This excercise in particular the code of #4142
+ * This exercises in particular the code of #4142
  */
 @Test
 public void testValidationMultipleSSTablePerLevel() throws Exception
@@ -57,7 +57,7 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 String ksname = Keyspace1;
 String cfname = StandardLeveled;
 Table table = Table.open(ksname);
-ColumnFamilyStore store = table.getColumnFamilyStore(cfname);
+ColumnFamilyStore cfs = table.getColumnFamilyStore(cfname);
 
 ByteBuffer value = ByteBuffer.wrap(new byte[100 * 1024]); // 100 KB 
value, make it easy to have multiple files
 
@@ -75,15 +75,14 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 rm.add(cfname, ByteBufferUtil.bytes(column + c), value, 0);
 }
 rm.apply();
-store.forceBlockingFlush();
+cfs.forceBlockingFlush();
 }
 
-LeveledCompactionStrategy strat = 
(LeveledCompactionStrategy)store.getCompactionStrategy();
-
+LeveledCompactionStrategy strat = 
(LeveledCompactionStrategy)cfs.getCompactionStrategy();
 while (strat.getLevelSize(0)  1)
 {
-store.forceMajorCompaction();
-Thread.sleep(200);
+cfs.forceMajorCompaction();
+Thread.sleep(100);
 }
 // Checking we're not completely bad at math
 assert strat.getLevelSize(1)  0;
@@ -94,7 +93,7 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 int gcBefore = (int)(System.currentTimeMillis()/1000) - 
table.getColumnFamilyStore(cfname).metadata.getGcGraceSeconds();
 ActiveRepairService.TreeRequest req = new 
ActiveRepairService.TreeRequest(1, FBUtilities.getLocalAddress(), range, 
gcBefore, p);
 ActiveRepairService.Validator validator = new 
ActiveRepairService.Validator(req);
-CompactionManager.instance.submitValidation(store, validator).get();
+CompactionManager.instance.submitValidation(cfs, validator).get();
 }
 
 @Test
@@ -103,7 +102,7 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 String ksname = Keyspace1;
 String cfname = StandardLeveled;
 Table table = Table.open(ksname);
-ColumnFamilyStore store = table.getColumnFamilyStore(cfname);
+ColumnFamilyStore cfs = table.getColumnFamilyStore(cfname);
 
 // make sure we have SSTables in L1
 ByteBuffer value = ByteBuffer.wrap(new byte[100 * 1024]);
@@ -118,11 +117,11 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 rm.add(cfname, ByteBufferUtil.bytes(column + c), value, 0);
 }
 rm.apply();
-store.forceBlockingFlush();
+cfs.forceBlockingFlush();
 }
-store.forceMajorCompaction();
+cfs.forceMajorCompaction();
 
-LeveledCompactionStrategy strat = 
(LeveledCompactionStrategy)store.getCompactionStrategy();
+LeveledCompactionStrategy strat = 
(LeveledCompactionStrategy)cfs.getCompactionStrategy();
 assert strat.getLevelSize(1)  0;
 
 // get LeveledScanner for level 1 sstables
@@ -135,13 +134,14 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 // scanner.getCurrentPosition should be equal to 

[2/2] git commit: make testCompactionProgress less racy

2013-04-09 Thread jbellis
make testCompactionProgress less racy


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6f8d7371
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6f8d7371
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6f8d7371

Branch: refs/heads/trunk
Commit: 6f8d73711a5d9d64947a1f5d51284bfda3d5d127
Parents: 2c35a5d
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 21:10:58 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 21:10:58 2013 -0500

--
 .../compaction/LeveledCompactionStrategyTest.java  |   56 ---
 1 files changed, 31 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f8d7371/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
 
b/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
index 9760c7e..4c70fe0 100644
--- 
a/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
+++ 
b/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
@@ -20,7 +20,9 @@ package org.apache.cassandra.db.compaction;
 import java.nio.ByteBuffer;
 import java.util.Collection;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
+import java.util.concurrent.ExecutionException;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -78,15 +80,11 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 cfs.forceBlockingFlush();
 }
 
-LeveledCompactionStrategy strat = 
(LeveledCompactionStrategy)cfs.getCompactionStrategy();
-while (strat.getLevelSize(0)  1)
-{
-cfs.forceMajorCompaction();
-Thread.sleep(100);
-}
+waitForLeveling(cfs);
+LeveledCompactionStrategy strategy = (LeveledCompactionStrategy) 
cfs.getCompactionStrategy();
 // Checking we're not completely bad at math
-assert strat.getLevelSize(1)  0;
-assert strat.getLevelSize(2)  0;
+assert strategy.getLevelSize(1)  0;
+assert strategy.getLevelSize(2)  0;
 
 ActiveRepairService.CFPair p = new ActiveRepairService.CFPair(ksname, 
cfname);
 RangeToken range = new RangeToken(Util.token(), Util.token());
@@ -96,6 +94,17 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 CompactionManager.instance.submitValidation(cfs, validator).get();
 }
 
+/**
+ * wait for leveled compaction to quiesce on the given columnfamily
+ */
+private void waitForLeveling(ColumnFamilyStore cfs) throws 
InterruptedException, ExecutionException
+{
+LeveledCompactionStrategy strategy = (LeveledCompactionStrategy) 
cfs.getCompactionStrategy();
+// L0 is the lowest priority, so when that's done, we know everything 
is done
+while (strategy.getLevelSize(0)  1)
+Thread.sleep(100);
+}
+
 @Test
 public void testCompactionProgress() throws Exception
 {
@@ -119,14 +128,16 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 rm.apply();
 cfs.forceBlockingFlush();
 }
-cfs.forceMajorCompaction();
 
-LeveledCompactionStrategy strat = 
(LeveledCompactionStrategy)cfs.getCompactionStrategy();
-assert strat.getLevelSize(1)  0;
+waitForLeveling(cfs);
+LeveledCompactionStrategy strategy = (LeveledCompactionStrategy) 
cfs.getCompactionStrategy();
+assert strategy.getLevelSize(1)  0;
 
 // get LeveledScanner for level 1 sstables
-CollectionSSTableReader sstables = strat.manifest.getLevel(1);
-ICompactionScanner scanner = strat.getScanners(sstables).get(0);
+CollectionSSTableReader sstables = strategy.manifest.getLevel(1);
+ListICompactionScanner scanners = strategy.getScanners(sstables);
+assertEquals(1, scanners.size()); // should be one per level
+ICompactionScanner scanner = scanners.get(0);
 // scan through to the end
 while (scanner.hasNext())
 scanner.next();
@@ -162,35 +173,30 @@ public class LeveledCompactionStrategyTest extends 
SchemaLoader
 cfs.forceBlockingFlush();
 }
 
-cfs.disableAutoCompaction();
-LeveledCompactionStrategy strat = 
(LeveledCompactionStrategy)cfs.getCompactionStrategy();
-while (strat.getLevelSize(0)  1)
-{
-cfs.forceMajorCompaction();
-Thread.sleep(100);
-}
+waitForLeveling(cfs);
+LeveledCompactionStrategy strategy = (LeveledCompactionStrategy) 

[Cassandra Wiki] Trivial Update of Janice469 by Janice469

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The Janice469 page has been changed by Janice469:
http://wiki.apache.org/cassandra/Janice469

New page:
Florencio Sowa is what individuals call him eventhough it is not his birth 
name.BR
His others say it's useless for him but rather what he prefers doing is laptop 
or computer and he's only been doing it for quite some time. He used to be 
unemployed exactly how he is a functional receptionist. He at present lives in 
Birmingham, al and his dads and moms live nearby.BR
He's happened to be working on michael's website for a few minutes now. Check 
about it here: http://www.bostonis.com


[jira] [Commented] (CASSANDRA-3919) Dropping a column should do more than just remove the definition

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627390#comment-13627390
 ] 

Jonathan Ellis commented on CASSANDRA-3919:
---

I guess last component is basically trying to say the user-visible cql 
column name?

Kind of surprised that we haven't needed that code before, but I guess it 
works. :)

 Dropping a column should do more than just remove the definition
 

 Key: CASSANDRA-3919
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: compaction, cql
 Fix For: 2.0


 Dropping a column should:
 - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
 - eventually (i.e., post-compaction) reclaim the space formerly used by that 
 column

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[1/6] git commit: Fix trying to load deleted row into row cache on startup patch by jbellis; reviewed by dbrosius for CASSANDRA-4463

2013-04-09 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.1 4a010ed91 - feae9efa4
  refs/heads/cassandra-1.2 c7eb146e5 - 225cb0e7f
  refs/heads/trunk 6f8d73711 - 3852085a6


Fix trying to load deleted row into row cache on startup
patch by jbellis; reviewed by dbrosius for CASSANDRA-4463


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/feae9efa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/feae9efa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/feae9efa

Branch: refs/heads/cassandra-1.1
Commit: feae9efa42a3395fce2447e97258ffdbe19d31cb
Parents: 4a010ed
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 21:23:21 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 21:23:21 2013 -0500

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/feae9efa/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index fa407b5..59a7443 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.11
+ * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
  * Update offline scrub for 1.0 - 1.1 directory structure (CASSANDRA-5195)
  * add tmp flag to Descriptor hashcode (CASSANDRA-4021)
  * fix logging of Found table data in data directories when only system 
tables

http://git-wip-us.apache.org/repos/asf/cassandra/blob/feae9efa/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 8d239e3..02a782f 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -457,7 +457,8 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 ColumnFamily data = 
getTopLevelColumns(QueryFilter.getIdentityFilter(key, new 
QueryPath(columnFamily)),
Integer.MIN_VALUE,
true);
-CacheService.instance.rowCache.put(new RowCacheKey(metadata.cfId, 
key), data);
+if (data != null)
+CacheService.instance.rowCache.put(new 
RowCacheKey(metadata.cfId, key), data);
 cachedRowsRead++;
 }
 



[2/6] git commit: Fix trying to load deleted row into row cache on startup patch by jbellis; reviewed by dbrosius for CASSANDRA-4463

2013-04-09 Thread jbellis
Fix trying to load deleted row into row cache on startup
patch by jbellis; reviewed by dbrosius for CASSANDRA-4463


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/feae9efa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/feae9efa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/feae9efa

Branch: refs/heads/cassandra-1.2
Commit: feae9efa42a3395fce2447e97258ffdbe19d31cb
Parents: 4a010ed
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 21:23:21 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 21:23:21 2013 -0500

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/feae9efa/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index fa407b5..59a7443 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.11
+ * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
  * Update offline scrub for 1.0 - 1.1 directory structure (CASSANDRA-5195)
  * add tmp flag to Descriptor hashcode (CASSANDRA-4021)
  * fix logging of Found table data in data directories when only system 
tables

http://git-wip-us.apache.org/repos/asf/cassandra/blob/feae9efa/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 8d239e3..02a782f 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -457,7 +457,8 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 ColumnFamily data = 
getTopLevelColumns(QueryFilter.getIdentityFilter(key, new 
QueryPath(columnFamily)),
Integer.MIN_VALUE,
true);
-CacheService.instance.rowCache.put(new RowCacheKey(metadata.cfId, 
key), data);
+if (data != null)
+CacheService.instance.rowCache.put(new 
RowCacheKey(metadata.cfId, key), data);
 cachedRowsRead++;
 }
 



[3/6] git commit: Fix trying to load deleted row into row cache on startup patch by jbellis; reviewed by dbrosius for CASSANDRA-4463

2013-04-09 Thread jbellis
Fix trying to load deleted row into row cache on startup
patch by jbellis; reviewed by dbrosius for CASSANDRA-4463


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/feae9efa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/feae9efa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/feae9efa

Branch: refs/heads/trunk
Commit: feae9efa42a3395fce2447e97258ffdbe19d31cb
Parents: 4a010ed
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 21:23:21 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 21:23:21 2013 -0500

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/feae9efa/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index fa407b5..59a7443 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.11
+ * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
  * Update offline scrub for 1.0 - 1.1 directory structure (CASSANDRA-5195)
  * add tmp flag to Descriptor hashcode (CASSANDRA-4021)
  * fix logging of Found table data in data directories when only system 
tables

http://git-wip-us.apache.org/repos/asf/cassandra/blob/feae9efa/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 8d239e3..02a782f 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -457,7 +457,8 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 ColumnFamily data = 
getTopLevelColumns(QueryFilter.getIdentityFilter(key, new 
QueryPath(columnFamily)),
Integer.MIN_VALUE,
true);
-CacheService.instance.rowCache.put(new RowCacheKey(metadata.cfId, 
key), data);
+if (data != null)
+CacheService.instance.rowCache.put(new 
RowCacheKey(metadata.cfId, key), data);
 cachedRowsRead++;
 }
 



[4/6] git commit: merge from 1.1

2013-04-09 Thread jbellis
merge from 1.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/225cb0e7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/225cb0e7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/225cb0e7

Branch: refs/heads/trunk
Commit: 225cb0e7fac97c302783d2334b5b57926bbfa346
Parents: c7eb146 feae9ef
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 21:25:13 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 21:25:13 2013 -0500

--
 CHANGES.txt|2 ++
 .../org/apache/cassandra/service/CacheService.java |3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/225cb0e7/CHANGES.txt
--
diff --cc CHANGES.txt
index 32aba15,59a7443..66279f0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,76 -1,5 +1,78 @@@
 -1.1.11
 +1.2.5
 + * Include fatal errors in trace events (CASSANDRA-5447)
 + * Ensure that PerRowSecondaryIndex is notified of row-level deletes
 +   (CASSANDRA-5445)
++Merged from 1.1:
+  * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
 +
 +
 +1.2.4
 + * Ensure that PerRowSecondaryIndex updates see the most recent values
 +   (CASSANDRA-5397)
 + * avoid duplicate index entries ind PrecompactedRow and 
 +   ParallelCompactionIterable (CASSANDRA-5395)
 + * remove the index entry on oldColumn when new column is a tombstone 
 +   (CASSANDRA-5395)
 + * Change default stream throughput from 400 to 200 mbps (CASSANDRA-5036)
 + * Gossiper logs DOWN for symmetry with UP (CASSANDRA-5187)
 + * Fix mixing prepared statements between keyspaces (CASSANDRA-5352)
 + * Fix consistency level during bootstrap - strike 3 (CASSANDRA-5354)
 + * Fix transposed arguments in AlreadyExistsException (CASSANDRA-5362)
 + * Improve asynchronous hint delivery (CASSANDRA-5179)
 + * Fix Guava dependency version (12.0 - 13.0.1) for Maven (CASSANDRA-5364)
 + * Validate that provided CQL3 collection value are  64K (CASSANDRA-5355)
 + * Make upgradeSSTable skip current version sstables by default 
(CASSANDRA-5366)
 + * Optimize min/max timestamp collection (CASSANDRA-5373)
 + * Invalid streamId in cql binary protocol when using invalid CL 
 +   (CASSANDRA-5164)
 + * Fix validation for IN where clauses with collections (CASSANDRA-5376)
 + * Copy resultSet on count query to avoid ConcurrentModificationException 
 +   (CASSANDRA-5382)
 + * Correctly typecheck in CQL3 even with ReversedType (CASSANDRA-5386)
 + * Fix streaming compressed files when using encryption (CASSANDRA-5391)
 + * cassandra-all 1.2.0 pom missing netty dependency (CASSANDRA-5392)
 + * Fix writetime/ttl functions on null values (CASSANDRA-5341)
 + * Fix NPE during cql3 select with token() (CASSANDRA-5404)
 + * IndexHelper.skipBloomFilters won't skip non-SHA filters (CASSANDRA-5385)
 + * cqlsh: Print maps ordered by key, sort sets (CASSANDRA-5413)
 + * Add null syntax support in CQL3 for inserts (CASSANDRA-3783)
 + * Allow unauthenticated set_keyspace() calls (CASSANDRA-5423)
 + * Fix potential incremental backups race (CASSANDRA-5410)
 + * Fix prepared BATCH statements with batch-level timestamps (CASSANDRA-5415)
 + * Allow overriding superuser setup delay (CASSANDRA-5430)
 + * cassandra-shuffle with JMX usernames and passwords (CASSANDRA-5431)
 +Merged from 1.1:
 + * cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
 + * Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)
 + * Fix cf name extraction from manifest in Directories.migrateFile() 
 +   (CASSANDRA-5242)
 + * Support pluggable internode authentication (CASSANDRA-5401)
 +
 +
 +1.2.3
 + * add check for sstable overlap within a level on startup (CASSANDRA-5327)
 + * replace ipv6 colons in jmx object names (CASSANDRA-5298, 5328)
 + * Avoid allocating SSTableBoundedScanner during repair when the range does 
 +   not intersect the sstable (CASSANDRA-5249)
 + * Don't lowercase property map keys (this breaks NTS) (CASSANDRA-5292)
 + * Fix composite comparator with super columns (CASSANDRA-5287)
 + * Fix insufficient validation of UPDATE queries against counter cfs
 +   (CASSANDRA-5300)
 + * Fix PropertyFileSnitch default DC/Rack behavior (CASSANDRA-5285)
 + * Handle null values when executing prepared statement (CASSANDRA-5081)
 + * Add netty to pom dependencies (CASSANDRA-5181)
 + * Include type arguments in Thrift CQLPreparedResult (CASSANDRA-5311)
 + * Fix compaction not removing columns when bf_fp_ratio is 1 (CASSANDRA-5182)
 + * cli: Warn about missing CQL3 tables in schema descriptions (CASSANDRA-5309)
 + * Re-enable unknown option in replication/compaction strategies option for
 +   backward compatibility (CASSANDRA-4795)
 + 

[5/6] git commit: merge from 1.1

2013-04-09 Thread jbellis
merge from 1.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/225cb0e7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/225cb0e7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/225cb0e7

Branch: refs/heads/cassandra-1.2
Commit: 225cb0e7fac97c302783d2334b5b57926bbfa346
Parents: c7eb146 feae9ef
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 21:25:13 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 21:25:13 2013 -0500

--
 CHANGES.txt|2 ++
 .../org/apache/cassandra/service/CacheService.java |3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/225cb0e7/CHANGES.txt
--
diff --cc CHANGES.txt
index 32aba15,59a7443..66279f0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,76 -1,5 +1,78 @@@
 -1.1.11
 +1.2.5
 + * Include fatal errors in trace events (CASSANDRA-5447)
 + * Ensure that PerRowSecondaryIndex is notified of row-level deletes
 +   (CASSANDRA-5445)
++Merged from 1.1:
+  * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
 +
 +
 +1.2.4
 + * Ensure that PerRowSecondaryIndex updates see the most recent values
 +   (CASSANDRA-5397)
 + * avoid duplicate index entries ind PrecompactedRow and 
 +   ParallelCompactionIterable (CASSANDRA-5395)
 + * remove the index entry on oldColumn when new column is a tombstone 
 +   (CASSANDRA-5395)
 + * Change default stream throughput from 400 to 200 mbps (CASSANDRA-5036)
 + * Gossiper logs DOWN for symmetry with UP (CASSANDRA-5187)
 + * Fix mixing prepared statements between keyspaces (CASSANDRA-5352)
 + * Fix consistency level during bootstrap - strike 3 (CASSANDRA-5354)
 + * Fix transposed arguments in AlreadyExistsException (CASSANDRA-5362)
 + * Improve asynchronous hint delivery (CASSANDRA-5179)
 + * Fix Guava dependency version (12.0 - 13.0.1) for Maven (CASSANDRA-5364)
 + * Validate that provided CQL3 collection value are  64K (CASSANDRA-5355)
 + * Make upgradeSSTable skip current version sstables by default 
(CASSANDRA-5366)
 + * Optimize min/max timestamp collection (CASSANDRA-5373)
 + * Invalid streamId in cql binary protocol when using invalid CL 
 +   (CASSANDRA-5164)
 + * Fix validation for IN where clauses with collections (CASSANDRA-5376)
 + * Copy resultSet on count query to avoid ConcurrentModificationException 
 +   (CASSANDRA-5382)
 + * Correctly typecheck in CQL3 even with ReversedType (CASSANDRA-5386)
 + * Fix streaming compressed files when using encryption (CASSANDRA-5391)
 + * cassandra-all 1.2.0 pom missing netty dependency (CASSANDRA-5392)
 + * Fix writetime/ttl functions on null values (CASSANDRA-5341)
 + * Fix NPE during cql3 select with token() (CASSANDRA-5404)
 + * IndexHelper.skipBloomFilters won't skip non-SHA filters (CASSANDRA-5385)
 + * cqlsh: Print maps ordered by key, sort sets (CASSANDRA-5413)
 + * Add null syntax support in CQL3 for inserts (CASSANDRA-3783)
 + * Allow unauthenticated set_keyspace() calls (CASSANDRA-5423)
 + * Fix potential incremental backups race (CASSANDRA-5410)
 + * Fix prepared BATCH statements with batch-level timestamps (CASSANDRA-5415)
 + * Allow overriding superuser setup delay (CASSANDRA-5430)
 + * cassandra-shuffle with JMX usernames and passwords (CASSANDRA-5431)
 +Merged from 1.1:
 + * cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
 + * Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)
 + * Fix cf name extraction from manifest in Directories.migrateFile() 
 +   (CASSANDRA-5242)
 + * Support pluggable internode authentication (CASSANDRA-5401)
 +
 +
 +1.2.3
 + * add check for sstable overlap within a level on startup (CASSANDRA-5327)
 + * replace ipv6 colons in jmx object names (CASSANDRA-5298, 5328)
 + * Avoid allocating SSTableBoundedScanner during repair when the range does 
 +   not intersect the sstable (CASSANDRA-5249)
 + * Don't lowercase property map keys (this breaks NTS) (CASSANDRA-5292)
 + * Fix composite comparator with super columns (CASSANDRA-5287)
 + * Fix insufficient validation of UPDATE queries against counter cfs
 +   (CASSANDRA-5300)
 + * Fix PropertyFileSnitch default DC/Rack behavior (CASSANDRA-5285)
 + * Handle null values when executing prepared statement (CASSANDRA-5081)
 + * Add netty to pom dependencies (CASSANDRA-5181)
 + * Include type arguments in Thrift CQLPreparedResult (CASSANDRA-5311)
 + * Fix compaction not removing columns when bf_fp_ratio is 1 (CASSANDRA-5182)
 + * cli: Warn about missing CQL3 tables in schema descriptions (CASSANDRA-5309)
 + * Re-enable unknown option in replication/compaction strategies option for
 +   backward compatibility 

[6/6] git commit: merge from 1.2

2013-04-09 Thread jbellis
merge from 1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3852085a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3852085a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3852085a

Branch: refs/heads/trunk
Commit: 3852085a633cbd9bb85607e534f45d295157140f
Parents: 6f8d737 225cb0e
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Apr 9 21:25:52 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Apr 9 21:25:52 2013 -0500

--
 CHANGES.txt|2 ++
 .../org/apache/cassandra/service/CacheService.java |3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3852085a/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3852085a/src/java/org/apache/cassandra/service/CacheService.java
--
diff --cc src/java/org/apache/cassandra/service/CacheService.java
index e389a5d,bc218c4..c927bfb
--- a/src/java/org/apache/cassandra/service/CacheService.java
+++ b/src/java/org/apache/cassandra/service/CacheService.java
@@@ -334,8 -351,9 +334,9 @@@ public class CacheService implements Ca
  for (ByteBuffer key : buffers)
  {
  DecoratedKey dk = cfs.partitioner.decorateKey(key);
 -ColumnFamily data = 
cfs.getTopLevelColumns(QueryFilter.getIdentityFilter(dk, new 
QueryPath(cfs.columnFamily)), Integer.MIN_VALUE, true);
 +ColumnFamily data = 
cfs.getTopLevelColumns(QueryFilter.getIdentityFilter(dk, cfs.name), 
Integer.MIN_VALUE, true);
- rowCache.put(new RowCacheKey(cfs.metadata.cfId, dk), data);
+ if (data != null)
+ rowCache.put(new RowCacheKey(cfs.metadata.cfId, dk), 
data);
  }
  }
  }



[jira] [Commented] (CASSANDRA-4463) Nodes Don't Restart: Assertion Error on Serializing Cache provider

2013-04-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13627397#comment-13627397
 ] 

Jonathan Ellis commented on CASSANDRA-4463:
---

I'm not 100% sure why we track cachedRowsRead to be honest.  If I were to guess 
it might be some measure of how much work cache loading cost us at startup, in 
which case I think we do want to increment.  (This is more explicit in 1.2, 
where we log the time taken if rows read  0.)

Fixed EOL and committed, thanks.

 Nodes Don't Restart: Assertion Error on Serializing Cache provider
 --

 Key: CASSANDRA-4463
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4463
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
 Environment: Ubuntu 12.04 Precise
 Cassandra 1.1.5
 Oracle Java 6
Reporter: Arya Goudarzi
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.1.11

 Attachments: 4463.txt


 I stopped Cassandra on one of our 1.1.2 nodes and I couldn't start it any 
 more. System.log didn't have much useful info but output.log had this:
 java.lang.AssertionError
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:43)
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:39)
 at 
 org.apache.cassandra.cache.SerializingCache.serialize(SerializingCache.java:116)
 at 
 org.apache.cassandra.cache.SerializingCache.put(SerializingCache.java:174)
 at 
 org.apache.cassandra.cache.InstrumentingCache.put(InstrumentingCache.java:45)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.initRowCache(ColumnFamilyStore.java:430)
 at org.apache.cassandra.db.Table.open(Table.java:124)
 at org.apache.cassandra.db.Table.open(Table.java:97)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:204)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.init(AbstractCassandraDaemon.java:254)
 at 
 com.netflix.priam.cassandra.NFThinCassandraDaemon.init(NFThinCassandraDaemon.java:41)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:212)
 Cannot load daemon
 Service exit with a return value of 3
 Deleting the stuff in saved_caches folder fixed the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4463) Nodes Don't Restart: Assertion Error on Serializing Cache provider

2013-04-09 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-4463:
--

Affects Version/s: (was: 1.1.5)
   1.1.0
Fix Version/s: 1.2.5

 Nodes Don't Restart: Assertion Error on Serializing Cache provider
 --

 Key: CASSANDRA-4463
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4463
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0
 Environment: Ubuntu 12.04 Precise
 Cassandra 1.1.5
 Oracle Java 6
Reporter: Arya Goudarzi
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.1.11, 1.2.5

 Attachments: 4463.txt


 I stopped Cassandra on one of our 1.1.2 nodes and I couldn't start it any 
 more. System.log didn't have much useful info but output.log had this:
 java.lang.AssertionError
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:43)
 at 
 org.apache.cassandra.cache.SerializingCacheProvider$RowCacheSerializer.serialize(SerializingCacheProvider.java:39)
 at 
 org.apache.cassandra.cache.SerializingCache.serialize(SerializingCache.java:116)
 at 
 org.apache.cassandra.cache.SerializingCache.put(SerializingCache.java:174)
 at 
 org.apache.cassandra.cache.InstrumentingCache.put(InstrumentingCache.java:45)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.initRowCache(ColumnFamilyStore.java:430)
 at org.apache.cassandra.db.Table.open(Table.java:124)
 at org.apache.cassandra.db.Table.open(Table.java:97)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:204)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.init(AbstractCassandraDaemon.java:254)
 at 
 com.netflix.priam.cassandra.NFThinCassandraDaemon.init(NFThinCassandraDaemon.java:41)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:212)
 Cannot load daemon
 Service exit with a return value of 3
 Deleting the stuff in saved_caches folder fixed the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Cassandra Wiki] Trivial Update of JermaineF by JermaineF

2013-04-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The JermaineF page has been changed by JermaineF:
http://wiki.apache.org/cassandra/JermaineF

New page:
Name: Abraham BarksdaleBR
My age: 18BR
Country: SwitzerlandBR
Town: Villars-Le-Terroir BR
ZIP: 1040BR
Street: Via Stauffacher 128BR
BR
Here is my web site; 
[[http://www.panafprehistory.org/index.php/member/31568/|source]]