cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bened...@apache.org
Subject [04/10] cassandra git commit: ninja-fix handling of unfinished serialized boundaries (bug from CASSANDRA-10357)
Date Tue, 13 Oct 2015 08:37:32 GMT
ninja-fix handling of unfinished serialized boundaries (bug from CASSANDRA-10357)


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

Branch: refs/heads/trunk
Commit: c3ba6c8bdea7f0528f947d34fec2a9dd81d6142a
Parents: 4acc3a6
Author: Benedict Elliott Smith <benedict@apache.org>
Authored: Tue Oct 13 09:33:35 2015 +0100
Committer: Benedict Elliott Smith <benedict@apache.org>
Committed: Tue Oct 13 09:33:35 2015 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/io/util/MmappedSegmentedFile.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c3ba6c8b/src/java/org/apache/cassandra/io/util/MmappedSegmentedFile.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/util/MmappedSegmentedFile.java b/src/java/org/apache/cassandra/io/util/MmappedSegmentedFile.java
index 623f65a..1109d37 100644
--- a/src/java/org/apache/cassandra/io/util/MmappedSegmentedFile.java
+++ b/src/java/org/apache/cassandra/io/util/MmappedSegmentedFile.java
@@ -269,7 +269,7 @@ public class MmappedSegmentedFile extends SegmentedFile
             private static long[] ensureCapacity(long[] boundaries, int fixedCount)
             {
                 if (fixedCount + 1 >= boundaries.length)
-                    return Arrays.copyOf(boundaries, boundaries.length * 2);
+                    return Arrays.copyOf(boundaries, Math.max(fixedCount + 2, boundaries.length
* 2));
                 return boundaries;
             }
 


Mime
View raw message