cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: add short-circuit abort check in searchInternal patch by Daniel Doubleday; reviewed by jbellis for CASSANDRA-3708
Date Thu, 21 Jun 2012 18:36:49 GMT
Updated Branches:
  refs/heads/trunk e6610e469 -> 84bfdf27d


add short-circuit abort check in searchInternal
patch by Daniel Doubleday; reviewed by jbellis for CASSANDRA-3708


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

Branch: refs/heads/trunk
Commit: 84bfdf27dfbd8aa3c030fd77b188c245db9bf705
Parents: e6610e4
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Jun 21 13:36:29 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Jun 21 13:36:29 2012 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/utils/IntervalTree.java   |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/84bfdf27/src/java/org/apache/cassandra/utils/IntervalTree.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/IntervalTree.java b/src/java/org/apache/cassandra/utils/IntervalTree.java
index ec8e166..ba9e438 100644
--- a/src/java/org/apache/cassandra/utils/IntervalTree.java
+++ b/src/java/org/apache/cassandra/utils/IntervalTree.java
@@ -290,6 +290,9 @@ public class IntervalTree<C, D, I extends Interval<C, D>>
implements Iterable<I>
 
         void searchInternal(Interval<C, D> searchInterval, List<D> results)
         {
+            if (comparePoints(searchInterval.max, low) < 0 || comparePoints(searchInterval.min,
high) > 0)
+                return;
+
             if (contains(searchInterval, center))
             {
                 // Adds every interval contained in this node to the result set then search
left and right for further


Mime
View raw message