cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/3] git commit: Merge branch 'cassandra-1.2' into trunk
Date Wed, 24 Jul 2013 14:58:34 GMT
Merge branch 'cassandra-1.2' into trunk

Conflicts:
	src/java/org/apache/cassandra/db/DeletionTime.java
	src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
	src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java


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

Branch: refs/heads/trunk
Commit: 6cc50946300ba0a24d1028a0e266a3dc627ed404
Parents: 4021fff d38446a
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Jul 24 16:58:24 2013 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Jul 24 16:58:24 2013 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                     | 1 +
 src/java/org/apache/cassandra/db/DeletionTime.java              | 4 ++--
 src/java/org/apache/cassandra/db/RangeTombstone.java            | 4 ++--
 .../org/apache/cassandra/db/compaction/LazilyCompactedRow.java  | 3 +--
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java         | 5 ++++-
 5 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6cc50946/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6cc50946/src/java/org/apache/cassandra/db/DeletionTime.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/DeletionTime.java
index 5296529,deab30b..3d6fad4
--- a/src/java/org/apache/cassandra/db/DeletionTime.java
+++ b/src/java/org/apache/cassandra/db/DeletionTime.java
@@@ -83,9 -83,9 +83,9 @@@ public class DeletionTime implements Co
          return localDeletionTime < gcBefore;
      }
  
-     public boolean isDeleted(Column column, long now)
 -    public boolean isDeleted(IColumn column)
++    public boolean isDeleted(Column column)
      {
-         return column.isMarkedForDelete(now) && column.getMarkedForDeleteAt() <=
markedForDeleteAt;
 -        return column.mostRecentLiveChangeAt() <= markedForDeleteAt;
++        return column.timestamp() <= markedForDeleteAt;
      }
  
      public long memorySize()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6cc50946/src/java/org/apache/cassandra/db/RangeTombstone.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/RangeTombstone.java
index cac50e8,5e87847..02dddb2
--- a/src/java/org/apache/cassandra/db/RangeTombstone.java
+++ b/src/java/org/apache/cassandra/db/RangeTombstone.java
@@@ -237,7 -239,7 +237,7 @@@ public class RangeTombstone extends Int
              }
          }
  
-         public boolean isDeleted(Column column, long now)
 -        public boolean isDeleted(IColumn column)
++        public boolean isDeleted(Column column)
          {
              for (RangeTombstone tombstone : ranges)
              {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6cc50946/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
index 1f38494,9a03598..6390b14
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@@ -246,10 -293,10 +246,9 @@@ public class LazilyCompactedRow extend
  
                  // PrecompactedRow.removeDeletedAndOldShards have only checked the top-level
CF deletion times,
                  // not the range tombstone. For that we use the columnIndexer tombstone
tracker.
-                 // Note that this doesn't work for super columns.
-                 if (indexBuilder.tombstoneTracker().isDeleted(reduced, System.currentTimeMillis()))
+                 if (indexBuilder.tombstoneTracker().isDeleted(reduced))
                      return null;
  
 -                serializedSize += reduced.serializedSizeForSSTable();
                  columns++;
                  minTimestampSeen = Math.min(minTimestampSeen, reduced.minTimestamp());
                  maxTimestampSeen = Math.max(maxTimestampSeen, reduced.maxTimestamp());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6cc50946/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index 73f818f,2ff2d27..afc7409
--- a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@@ -83,31 -79,35 +83,34 @@@ public abstract class AbstractSimplePer
      public String expressionString(IndexExpression expr)
      {
          return String.format("'%s.%s %s %s'",
 -                             baseCfs.columnFamily,
 +                             baseCfs.name,
                               getExpressionComparator().getString(expr.column_name),
                               expr.op,
 -                             baseCfs.metadata.getColumn_metadata().get(expr.column_name).getValidator().getString(expr.value));
 +                             baseCfs.metadata.getColumnDefinition(expr.column_name).getValidator().getString(expr.value));
      }
  
 -
 -    public void delete(ByteBuffer rowKey, IColumn column)
 +    public void delete(ByteBuffer rowKey, Column column)
      {
 -        if (column.isMarkedForDelete())
 +        if (column.isMarkedForDelete(System.currentTimeMillis()))
              return;
  
 -        DecoratedKey valueKey = getIndexKeyFor(column.value());
 +        DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey, column));
          int localDeletionTime = (int) (System.currentTimeMillis() / 1000);
 -        ColumnFamily cfi = ColumnFamily.create(indexCfs.metadata);
 +        ColumnFamily cfi = ArrayBackedSortedColumns.factory.create(indexCfs.metadata);
-         cfi.addTombstone(makeIndexColumnName(rowKey, column), localDeletionTime, column.timestamp());
+         ByteBuffer name = makeIndexColumnName(rowKey, column);
 -        assert name.remaining() > 0 && name.remaining() <= IColumn.MAX_NAME_LENGTH
: name.remaining();
++        assert name.remaining() > 0 && name.remaining() <= Column.MAX_NAME_LENGTH
: name.remaining();
+         cfi.addTombstone(name, localDeletionTime, column.timestamp());
          indexCfs.apply(valueKey, cfi, SecondaryIndexManager.nullUpdater);
          if (logger.isDebugEnabled())
              logger.debug("removed index entry for cleaned-up value {}:{}", valueKey, cfi);
      }
  
 -    public void insert(ByteBuffer rowKey, IColumn column)
 +    public void insert(ByteBuffer rowKey, Column column)
      {
 -        DecoratedKey valueKey = getIndexKeyFor(column.value());
 -        ColumnFamily cfi = ColumnFamily.create(indexCfs.metadata);
 +        DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey, column));
 +        ColumnFamily cfi = ArrayBackedSortedColumns.factory.create(indexCfs.metadata);
          ByteBuffer name = makeIndexColumnName(rowKey, column);
 -        assert name.remaining() > 0 && name.remaining() <= IColumn.MAX_NAME_LENGTH
: name.remaining();
++        assert name.remaining() > 0 && name.remaining() <= Column.MAX_NAME_LENGTH
: name.remaining();
          if (column instanceof ExpiringColumn)
          {
              ExpiringColumn ec = (ExpiringColumn)column;


Mime
View raw message