cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r764679 - in /incubator/cassandra/trunk/src/org/apache/cassandra/db: ColumnFamilyStore.java FileStruct.java
Date Tue, 14 Apr 2009 05:12:45 GMT
Author: jbellis
Date: Tue Apr 14 05:12:44 2009
New Revision: 764679

URL: http://svn.apache.org/viewvc?rev=764679&view=rev
Log:
fix compaction regression.  patch by jbellis; reviewed by Todd Lipcon and Jun Rao
for #80.

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamilyStore.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/FileStruct.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamilyStore.java?rev=764679&r1=764678&r2=764679&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamilyStore.java Tue Apr 14
05:12:44 2009
@@ -664,7 +664,7 @@
             {
             	try
             	{
-            		fs = new FileStruct(SequenceFile.bufferedReader(file, bufferSize));
+            		fs = new FileStruct(SequenceFile.bufferedReader(file, bufferSize), StorageService.getPartitioner());
 	                fs.advance();
 	                if(fs.isExhausted())
 	                	continue;

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/FileStruct.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/FileStruct.java?rev=764679&r1=764678&r2=764679&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/FileStruct.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/FileStruct.java Tue Apr 14 05:12:44
2009
@@ -24,6 +24,7 @@
 import org.apache.cassandra.io.DataOutputBuffer;
 import org.apache.cassandra.io.IFileReader;
 import org.apache.cassandra.io.SSTable;
+import org.apache.cassandra.service.IPartitioner;
 
 
 public class FileStruct implements Comparable<FileStruct>
@@ -33,10 +34,12 @@
     private IFileReader reader;
     private DataInputBuffer bufIn;
     private DataOutputBuffer bufOut;
+    private IPartitioner partitioner;
 
-    public FileStruct(IFileReader reader)
+    public FileStruct(IFileReader reader, IPartitioner partitioner)
     {
         this.reader = reader;
+        this.partitioner = partitioner;
         bufIn = new DataInputBuffer();
         bufOut = new DataOutputBuffer();
     }
@@ -68,7 +71,7 @@
 
     public int compareTo(FileStruct f)
     {
-        return key.compareTo(f.key);
+        return partitioner.getDecoratedKeyComparator().compare(key, f.key);
     }
 
     /*



Mime
View raw message