cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/5] git commit: skip tombstones during hint replay patch by Vijay; reviewed by jbellis for CASSANDRA-4320
Date Thu, 14 Jun 2012 15:35:56 GMT
skip tombstones during hint replay
patch by Vijay; reviewed by jbellis for CASSANDRA-4320


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

Branch: refs/heads/trunk
Commit: 760214577c1ef9534d84402f51c2ad4d2a914aae
Parents: c3c9052
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Jun 13 13:57:08 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Jun 14 10:34:24 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../apache/cassandra/db/HintedHandOffManager.java  |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/76021457/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index fd6bfb8..0e47132 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -20,6 +20,7 @@
 
 
 1.1.2
+ * skip tombstones during hint replay (CASSANDRA-4320)
  * fix NPE in compactionstats (CASSANDRA-4318)
  * enforce 1m min keycache for auto (CASSANDRA-4306)
  * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/76021457/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 33c30ed..3aed559 100644
--- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java
+++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
@@ -328,6 +328,14 @@ 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