cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r892271 - in /incubator/cassandra/branches/cassandra-0.5: CHANGES.txt src/java/org/apache/cassandra/utils/MerkleTree.java
Date Fri, 18 Dec 2009 15:10:29 GMT
Author: jbellis
Date: Fri Dec 18 15:10:26 2009
New Revision: 892271

URL: http://svn.apache.org/viewvc?rev=892271&view=rev
Log:
fix off-by-one error in MerkleTree.  patch by Stu Hood; reviewed by gdusbabek for CASSANDRA-639

Modified:
    incubator/cassandra/branches/cassandra-0.5/CHANGES.txt
    incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/utils/MerkleTree.java

Modified: incubator/cassandra/branches/cassandra-0.5/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/CHANGES.txt?rev=892271&r1=892270&r2=892271&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/CHANGES.txt (original)
+++ incubator/cassandra/branches/cassandra-0.5/CHANGES.txt Fri Dec 18 15:10:26 2009
@@ -4,6 +4,7 @@
  * fix data streaming on windows (CASSANDRA-630)
  * GC compacted sstables after cleanup and compaction (CASSANDRA-621)
  * Speed up anti-entropy validation (CASSANDRA-629)
+ * Fix anti-entropy assertion error (CASSANDRA-639)
  * Fix pending range conflicts when bootstapping or moving
    multiple nodes at once (CASSANDRA-603)
 

Modified: incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/utils/MerkleTree.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/utils/MerkleTree.java?rev=892271&r1=892270&r2=892271&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/utils/MerkleTree.java
(original)
+++ incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/utils/MerkleTree.java
Fri Dec 18 15:10:26 2009
@@ -51,7 +51,7 @@
 {
     private static final long serialVersionUID = 2L;
 
-    public static final byte RECOMMENDED_DEPTH = Byte.MAX_VALUE;
+    public static final byte RECOMMENDED_DEPTH = Byte.MAX_VALUE - 1;
 
     public static final int CONSISTENT = 0;
     public static final int FULLY_INCONSISTENT = 1;
@@ -73,6 +73,7 @@
      */
     public MerkleTree(IPartitioner partitioner, byte hashdepth, long maxsize)
     {
+        assert hashdepth < Byte.MAX_VALUE;
         this.partitioner = partitioner;
         this.hashdepth = hashdepth;
         this.maxsize = maxsize;



Mime
View raw message