Author: slebresne
Date: Tue Dec  6 17:08:26 2011
New Revision: 1211030

URL: http://svn.apache.org/viewvc?rev=1211030&view=rev
Log:
Fix assertion error in DK
patch by slebresne; reviewed by jbellis for CASSANDRA-3574

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java

Modified: cassandra/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1211030&r1=1211029&r2=1211030&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Tue Dec  6 17:08:26 2011
@@ -14,7 +14,7 @@
  * Use faster bytes comparison (CASSANDRA-3434)
  * Bulk loader is no longer a fat client, (HADOOP) bulk load output format
    (CASSANDRA-3045)
- * remove assumption that keys and token are in bijection (CASSANDRA-1034)
+ * remove assumption that keys and token are in bijection (CASSANDRA-1034,3574)
  * always remove endpoints from delevery queue in HH (CASSANDRA-3546)
  * fix race between cf flush and its 2ndary indexes flush (CASSANDRA-3547)
  * fix potential race in AES when a repair fails (CASSANDRA-3548)

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java?rev=1211030&r1=1211029&r2=1211030&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java Tue 
Dec  6 17:08:26 2011
@@ -153,13 +153,13 @@ public class QueryProcessor
 
         ByteBuffer startKeyBytes = (select.getKeyStart() != null)
                                    ? 
select.getKeyStart().getByteBuffer(keyType)
-                                   : (new Term()).getByteBuffer();
+                                   : null;
 
         ByteBuffer finishKeyBytes = (select.getKeyFinish() != null)
                                     ? 
select.getKeyFinish().getByteBuffer(keyType)
-                                    : (new Term()).getByteBuffer();
+                                    : null;
 
-        RowPosition startKey = p.decorateKey(startKeyBytes), finishKey = 
p.decorateKey(finishKeyBytes);
+        RowPosition startKey = RowPosition.forKey(startKeyBytes, p), finishKey 
= RowPosition.forKey(finishKeyBytes, p);
         if (startKey.compareTo(finishKey) > 0 && !finishKey.isMinimum(p))
         {
             if (p instanceof RandomPartitioner)


Reply via email to