cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Date Wed, 29 Jan 2014 06:20:39 GMT
Merge branch 'cassandra-1.2' into cassandra-2.0


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

Branch: refs/heads/trunk
Commit: 479bf8a1103df7ae3fa6f260df08177b30da3452
Parents: 09ab439 d43f84b
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jan 29 00:11:49 2014 -0600
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Jan 29 00:16:05 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../cassandra/db/ArrayBackedSortedColumns.java  |  7 ++++-
 .../db/ArrayBackedSortedColumnsTest.java        | 28 ++++++++++++++++++++
 3 files changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/479bf8a1/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 8e757b2,ec546db..ac75587
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -23,29 -16,10 +23,30 @@@ Merged from 1.2
   * Improve error message when schema doesn't match loaded sstable (CASSANDRA-6262)
   * Add properties to adjust FD initial value and max interval (CASSANDRA-4375)
   * Fix preparing with batch and delete from collection (CASSANDRA-6607)
+  * Fix ABSC reverse iterator's remove() method (CASSANDRA-6629)
  
  
 -1.2.13
 +2.0.4
 + * Allow removing snapshots of no-longer-existing CFs (CASSANDRA-6418)
 + * add StorageService.stopDaemon() (CASSANDRA-4268)
 + * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
 + * add client encryption support to sstableloader (CASSANDRA-6378)
 + * Fix accept() loop for SSL sockets post-shutdown (CASSANDRA-6468)
 + * Fix size-tiered compaction in LCS L0 (CASSANDRA-6496)
 + * Fix assertion failure in filterColdSSTables (CASSANDRA-6483)
 + * Fix row tombstones in larger-than-memory compactions (CASSANDRA-6008)
 + * Fix cleanup ClassCastException (CASSANDRA-6462)
 + * Reduce gossip memory use by interning VersionedValue strings (CASSANDRA-6410)
 + * Allow specifying datacenters to participate in a repair (CASSANDRA-6218)
 + * Fix divide-by-zero in PCI (CASSANDRA-6403)
 + * Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
 + * Add millisecond precision formats to the timestamp parser (CASSANDRA-6395)
 + * Expose a total memtable size metric for a CF (CASSANDRA-6391)
 + * cqlsh: handle symlinks properly (CASSANDRA-6425)
 + * Fix potential infinite loop when paging query with IN (CASSANDRA-6464)
 + * Fix assertion error in AbstractQueryPager.discardFirst (CASSANDRA-6447)
 + * Fix streaming older SSTable yields unnecessary tombstones (CASSANDRA-6527)
 +Merged from 1.2:
   * Improved error message on bad properties in DDL queries (CASSANDRA-6453)
   * Randomize batchlog candidates selection (CASSANDRA-6481)
   * Fix thundering herd on endpoint cache invalidation (CASSANDRA-6345, 6485)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/479bf8a1/src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java
index d2825c1,662af62..389e0f8
--- a/src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java
+++ b/src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java
@@@ -352,19 -383,21 +352,21 @@@ public class ArrayBackedSortedColumns e
              return columns.size();
          }
  
 -        public Iterator<IColumn> iterator()
 +        public Iterator<Column> iterator()
          {
 -            return new Iterator<IColumn>()
 +            return new Iterator<Column>()
              {
                  int idx = size() - 1;
+                 boolean shouldCallNext = true;
  
                  public boolean hasNext()
                  {
                      return idx >= 0;
                  }
  
 -                public IColumn next()
 +                public Column next()
                  {
+                     shouldCallNext = false;
                      return columns.get(idx--);
                  }
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/479bf8a1/test/unit/org/apache/cassandra/db/ArrayBackedSortedColumnsTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/db/ArrayBackedSortedColumnsTest.java
index c720d28,00455d6..06e2e75
--- a/test/unit/org/apache/cassandra/db/ArrayBackedSortedColumnsTest.java
+++ b/test/unit/org/apache/cassandra/db/ArrayBackedSortedColumnsTest.java
@@@ -165,4 -186,32 +165,32 @@@ public class ArrayBackedSortedColumnsTe
              assert name == value : "Expected " + name + " but got " + value;
          }
      }
+ 
+     @Test
+     public void testRemove()
+     {
+         testRemoveInternal(false);
+         testRemoveInternal(true);
+     }
+ 
+     private void testRemoveInternal(boolean reversed)
+     {
 -        ISortedColumns map = ArrayBackedSortedColumns.factory.create(BytesType.instance,
reversed);
++        ColumnFamily map = ArrayBackedSortedColumns.factory.create(metadata(), reversed);
+         int[] values = new int[]{ 1, 2, 2, 3 };
+ 
+         for (int i = 0; i < values.length; ++i)
+             map.addColumn(new Column(ByteBufferUtil.bytes(values[reversed ? values.length
- 1 - i : i])), HeapAllocator.instance);
+ 
 -        Iterator<IColumn> iter = map.getReverseSortedColumns().iterator();
++        Iterator<Column> iter = map.getReverseSortedColumns().iterator();
+         assertTrue(iter.hasNext());
+         iter.next();
+         iter.remove();
+         assertTrue(iter.hasNext());
+         iter.next();
+         iter.remove();
+         assertTrue(iter.hasNext());
+         iter.next();
+         iter.remove();
+         assertTrue(!iter.hasNext());
+     }
  }


Mime
View raw message