cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1154267 - in /cassandra/branches/cassandra-0.7: CHANGES.txt src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Date Fri, 05 Aug 2011 15:29:06 GMT
Author: jbellis
Date: Fri Aug  5 15:29:06 2011
New Revision: 1154267

URL: http://svn.apache.org/viewvc?rev=1154267&view=rev
Log:
prune index scan resultset back to original request
patch by jbellis; tested by Roland Gude for CASSANDRA-2964

Modified:
    cassandra/branches/cassandra-0.7/CHANGES.txt
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1154267&r1=1154266&r2=1154267&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Fri Aug  5 15:29:06 2011
@@ -1,6 +1,8 @@
 0.7.9
  * don't include tmp files as sstable when create cfs (CASSANDRA-2929)
  * log Java classpath on startup (CASSANDRA-2895)
+ * prune index scan resultset back to original request for lazy
+   resultset expansion case (CASSANDRA-2964)
 
 
 0.7.8

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1154267&r1=1154266&r2=1154267&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Fri Aug  5 15:29:06 2011
@@ -1626,6 +1626,7 @@ public class ColumnFamilyStore implement
                 if (data == null)
                     data = ColumnFamily.create(metadata);
                 logger.debug("fetched data row {}", data);
+                NamesQueryFilter extraFilter = null;
                 if (dataFilter instanceof SliceQueryFilter && !isIdentityFilter((SliceQueryFilter)dataFilter))
                 {
                     // we might have gotten the expression columns in with the main data
slice, but
@@ -1644,7 +1645,7 @@ public class ColumnFamilyStore implement
                     }
                     if (needExtraFilter)
                     {
-                        NamesQueryFilter extraFilter = getExtraFilter(clause);
+                        extraFilter = getExtraFilter(clause);
                         for (IndexExpression expr : clause.expressions)
                         {
                             if (data.getColumn(expr.column_name) != null)
@@ -1662,7 +1663,7 @@ public class ColumnFamilyStore implement
                 {
                     logger.debug("row {} satisfies all clauses", data);
                     // cut the resultset back to what was requested, if necessary
-                    if (firstFilter != dataFilter)
+                    if (firstFilter != dataFilter || extraFilter != null)
                     {
                         ColumnFamily expandedData = data;
                         data = expandedData.cloneMeShallow();



Mime
View raw message