cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/9] git commit: move hint liveness check to beginning of loop
Date Thu, 14 Jun 2012 21:21:43 GMT
move hint liveness check to beginning of loop


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

Branch: refs/heads/cassandra-1.1
Commit: 33f1bacbf76d555ade8900ac235f54b5738445de
Parents: 1280c6c
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Jun 14 16:20:43 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Jun 14 16:20:43 2012 -0500

----------------------------------------------------------------------
 .../apache/cassandra/db/HintedHandOffManager.java  |   16 +++++++-------
 1 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/33f1bacb/src/java/org/apache/cassandra/db/HintedHandOffManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/HintedHandOffManager.java b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
index c7b160d..425ea33 100644
--- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java
+++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
@@ -318,6 +318,14 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
             page:
             for (IColumn hint : hintsPage.getSortedColumns())
             {
+                // Skip tombstones:
+                // if we iterate quickly enough, it's possible that we could request a new
page in the same millisecond
+                // in which the local deletion timestamp was generated on the last column
in the old page, in which
+                // case the hint will have no columns (since it's deleted) but will still
be included in the resultset
+                // since (even with gcgs=0) it's still a "relevant" tombstone.
+                if (!hint.isLive())
+                    continue;
+
                 startColumn = hint.name();
                 for (IColumn subColumn : hint.getSubColumns())
                 {
@@ -330,14 +338,6 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
                     }
                 }
 
-                // Skip tombstones:
-                // if we iterate quickly enough, it's possible that we could request a new
page in the same millisecond
-                // in which the local deletion timestamp was generated on the last column
in the old page, in which
-                // case the hint will have no columns (since it's deleted) but will still
be included in the resultset
-                // since (even with gcgs=0) it's still a "relevant" tombstone.
-                if (!hint.isLive())
-                    continue;
-
                 IColumn versionColumn = hint.getSubColumn(ByteBufferUtil.bytes("version"));
                 IColumn tableColumn = hint.getSubColumn(ByteBufferUtil.bytes("table"));
                 IColumn keyColumn = hint.getSubColumn(ByteBufferUtil.bytes("key"));


Mime
View raw message