You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2014/07/31 07:43:37 UTC

[1/2] git commit: Track min/max timestamps for range tombstones.

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 ff992442a -> c4d23e168


Track min/max timestamps for range tombstones.

Patch by marcuse; reviewed by iamaleksey for CASSANDRA-7647


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

Branch: refs/heads/cassandra-2.1.0
Commit: 892bf5551c06e669b02d161439463ebf2de0793c
Parents: b40cb05
Author: Marcus Eriksson <ma...@apache.org>
Authored: Wed Jul 30 13:38:51 2014 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Thu Jul 31 07:36:39 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                       | 1 +
 src/java/org/apache/cassandra/db/ColumnFamily.java                | 3 ++-
 .../org/apache/cassandra/db/compaction/LazilyCompactedRow.java    | 3 ++-
 src/java/org/apache/cassandra/io/sstable/SSTableWriter.java       | 2 ++
 4 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/892bf555/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4f08764..a6fc837 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -21,6 +21,7 @@
  * Add option to disable STCS in L0 (CASSANDRA-6621)
  * Fix error when doing reversed queries with static columns (CASSANDRA-7490)
  * Backport CASSANDRA-6747 (CASSANDRA-7560)
+ * Track max/min timestamps for range tombstones (CASSANDRA-7647)
 Merged from 1.2:
  * Set correct stream ID on responses when non-Exception Throwables
    are thrown while handling native protocol messages (CASSANDRA-7470)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/892bf555/src/java/org/apache/cassandra/db/ColumnFamily.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamily.java b/src/java/org/apache/cassandra/db/ColumnFamily.java
index 638eacc..95e5645 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamily.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamily.java
@@ -426,7 +426,8 @@ public abstract class ColumnFamily implements Iterable<Column>, IRowCacheEntry
         {
             RangeTombstone rangeTombstone = it.next();
             tombstones.update(rangeTombstone.getLocalDeletionTime());
-
+            minTimestampSeen = Math.min(minTimestampSeen, rangeTombstone.minTimestamp());
+            maxTimestampSeen = Math.max(maxTimestampSeen, rangeTombstone.maxTimestamp());
             minColumnNamesSeen = ColumnNameHelper.minComponents(minColumnNamesSeen, rangeTombstone.min, metadata.comparator);
             maxColumnNamesSeen = ColumnNameHelper.maxComponents(maxColumnNamesSeen, rangeTombstone.max, metadata.comparator);
         }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/892bf555/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
index 7cd0842..1da1757 100644
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -253,7 +253,8 @@ public class LazilyCompactedRow extends AbstractCompactedRow implements Iterable
                 else
                 {
                     tombstones.update(t.getLocalDeletionTime());
-
+                    minTimestampSeen = Math.min(minTimestampSeen, t.minTimestamp());
+                    maxTimestampSeen = Math.max(maxTimestampSeen, t.maxTimestamp());
                     minColumnNameSeen = ColumnNameHelper.minComponents(minColumnNameSeen, t.min, controller.cfs.metadata.comparator);
                     maxColumnNameSeen = ColumnNameHelper.maxComponents(maxColumnNameSeen, t.max, controller.cfs.metadata.comparator);
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/892bf555/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
index 3a2dca0..8a9bb18 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
@@ -243,6 +243,8 @@ public class SSTableWriter extends SSTable
         {
             RangeTombstone rangeTombstone = rangeTombstoneIterator.next();
             tombstones.update(rangeTombstone.getLocalDeletionTime());
+            minTimestamp = Math.min(minTimestamp, rangeTombstone.minTimestamp());
+            maxTimestamp = Math.max(maxTimestamp, rangeTombstone.maxTimestamp());
 
             minColumnNames = ColumnNameHelper.minComponents(minColumnNames, rangeTombstone.min, metadata.comparator);
             maxColumnNames = ColumnNameHelper.maxComponents(maxColumnNames, rangeTombstone.max, metadata.comparator);


[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

Posted by ma...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
	CHANGES.txt


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

Branch: refs/heads/cassandra-2.1.0
Commit: c4d23e168dd1b928669bc5255b79671751840a7c
Parents: ff99244 892bf55
Author: Marcus Eriksson <ma...@apache.org>
Authored: Thu Jul 31 07:38:16 2014 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Thu Jul 31 07:38:16 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                       | 1 +
 src/java/org/apache/cassandra/db/ColumnFamily.java                | 3 ++-
 .../org/apache/cassandra/db/compaction/LazilyCompactedRow.java    | 3 ++-
 src/java/org/apache/cassandra/io/sstable/SSTableWriter.java       | 2 ++
 4 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4d23e16/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d74db1a,a6fc837..3b2f35c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,43 -1,10 +1,44 @@@
 -2.0.10
 +2.1.0-final
   * Remove shuffle and taketoken (CASSANDRA-7601)
 - * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467)
 - * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611)
 - * Always merge ranges owned by a single node (CASSANDRA-6930)
 - * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Clean up Windows batch scripts (CASSANDRA-7619)
 + * Fix native protocol drop user type notification (CASSANDRA-7571)
 + * Give read access to system.schema_usertypes to all authenticated users
 +   (CASSANDRA-7578)
 + * (cqlsh) Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
 + * Get java version correctly when JAVA_TOOL_OPTIONS is set (CASSANDRA-7572)
 + * Fix NPE when dropping index from non-existent keyspace, AssertionError when
 +   dropping non-existent index with IF EXISTS (CASSANDRA-7590)
 + * Fix sstablelevelresetter hang (CASSANDRA-7614)
 + * (cqlsh) Fix deserialization of blobs (CASSANDRA-7603)
 + * Use "keyspace updated" schema change message for UDT changes in v1 and
 +   v2 protocols (CASSANDRA-7617)
 + * Fix tracing of range slices and secondary index lookups that are local
 +   to the coordinator (CASSANDRA-7599)
 + * Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
 + * Don't swap max/min col names when mutating sstable metadata (CASSANDRA-7596)
 + * (cqlsh) Correctly handle paged result sets (CASSANDRA-7625)
 + * (cqlsh) Improve waiting for a trace to complete (CASSANDRA-7626)
 + * Fix tracing of concurrent range slices and 2ary index queries (CASSANDRA-7626)
 +Merged from 2.0:
   * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
 + * Always merge ranges owned by a single node (CASSANDRA-6930)
++ * Track max/min timestamps for range tombstones (CASSANDRA-7647)
 +
 +
 +2.1.0-rc4
 + * Fix word count hadoop example (CASSANDRA-7200)
 + * Updated memtable_cleanup_threshold and memtable_flush_writers defaults 
 +   (CASSANDRA-7551)
 + * (Windows) fix startup when WMI memory query fails (CASSANDRA-7505)
 + * Anti-compaction proceeds if any part of the repair failed (CASANDRA-7521)
 + * Add missing table name to DROP INDEX responses and notifications (CASSANDRA-7539)
 + * Bump CQL version to 3.2.0 and update CQL documentation (CASSANDRA-7527)
 + * Fix configuration error message when running nodetool ring (CASSANDRA-7508)
 + * Support conditional updates, tuple type, and the v3 protocol in cqlsh (CASSANDRA-7509)
 + * Handle queries on multiple secondary index types (CASSANDRA-7525)
 + * Fix cqlsh authentication with v3 native protocol (CASSANDRA-7564)
 + * Fix NPE when unknown prepared statement ID is used (CASSANDRA-7454)
 +Merged from 2.0:
   * (Windows) force range-based repair to non-sequential mode (CASSANDRA-7541)
   * Fix range merging when DES scores are zero (CASSANDRA-7535)
   * Warn when SSL certificates have expired (CASSANDRA-7528)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4d23e16/src/java/org/apache/cassandra/db/ColumnFamily.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4d23e16/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
index 73a1927,1da1757..e922492
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@@ -245,9 -253,11 +245,10 @@@ public class LazilyCompactedRow extend
                  else
                  {
                      tombstones.update(t.getLocalDeletionTime());
- 
+                     minTimestampSeen = Math.min(minTimestampSeen, t.minTimestamp());
+                     maxTimestampSeen = Math.max(maxTimestampSeen, t.maxTimestamp());
                      minColumnNameSeen = ColumnNameHelper.minComponents(minColumnNameSeen, t.min, controller.cfs.metadata.comparator);
                      maxColumnNameSeen = ColumnNameHelper.maxComponents(maxColumnNameSeen, t.max, controller.cfs.metadata.comparator);
 -
                      return t;
                  }
              }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4d23e16/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
----------------------------------------------------------------------