cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/6] git commit: add path to MmappedSegmentedFile assertions
Date Fri, 25 Oct 2013 14:56:43 GMT
Updated Branches:
  refs/heads/cassandra-1.2 08a22729a -> dcbf35c55
  refs/heads/cassandra-2.0 3dc4e6563 -> 9385cfded
  refs/heads/trunk 2faac19e1 -> 8d1bb0753


add path to MmappedSegmentedFile assertions


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

Branch: refs/heads/cassandra-1.2
Commit: dcbf35c552a53e7779d7da917cbce78ecf109021
Parents: 08a2272
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Oct 25 09:47:00 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Oct 25 09:47:00 2013 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dcbf35c5/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 cb812bc..eeaf46e 100644
--- a/src/java/org/apache/cassandra/io/util/MmappedSegmentedFile.java
+++ b/src/java/org/apache/cassandra/io/util/MmappedSegmentedFile.java
@@ -54,10 +54,10 @@ public class MmappedSegmentedFile extends SegmentedFile
      */
     private Segment floor(long position)
     {
-        assert 0 <= position && position < length: position + " vs " + length;
+        assert 0 <= position && position < length: String.format("%d >=
%d in %s", position, length, path);
         Segment seg = new Segment(position, null);
         int idx = Arrays.binarySearch(segments, seg);
-        assert idx != -1 : "Bad position " + position + " in segments " + Arrays.toString(segments);
+        assert idx != -1 : String.format("Bad position %d for segments %s in %s", position,
Arrays.toString(segments), path);
         if (idx < 0)
             // round down to entry at insertion point
             idx = -(idx + 2);


Mime
View raw message