This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 364651d2a5f2b86a57bf2332555413109c1179eb
Merge: 63b3de9 094180b
Author: Mick Semb Wever <m...@apache.org>
AuthorDate: Fri Jan 10 11:42:52 2020 +0100

    Merge branch 'cassandra-3.11' into trunk

 CHANGES.txt                                        |  1 +
 .../cassandra/db/partitions/PartitionUpdate.java   |  9 +++++++++
 .../db/partition/PartitionUpdateTest.java          | 23 ++++++++++++++++++++++
 3 files changed, 33 insertions(+)

diff --cc CHANGES.txt
index f41d218,408048b..8e5907d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,10 +1,22 @@@
 -3.11.6
 +4.0-alpha3
 + * Better handling of file deletion failures by DiskFailurePolicy 
(CASSANDRA-15143)
 + * Prevent read repair mutations from increasing read timeout 
(CASSANDRA-15442)
 + * Document 4.0 system keyspace changes, bump generations (CASSANDRA-15454)
 + * Make it possible to disable STCS-in-L0 during runtime (CASSANDRA-15445)
 + * Removed obsolete OldNetworkTopologyStrategy (CASSANDRA-13990)
 + * Align record header of FQL and audit binary log (CASSANDRA-15076)
 + * Shuffle forwarding replica for messages to non-local DC (CASSANDRA-15318)
 + * Optimise native protocol ASCII string encoding (CASSANDRA-15410)
 + * Make sure all exceptions are propagated in DebuggableThreadPoolExecutor 
(CASSANDRA-15332)
 + * Make it possible to resize concurrent read / write thread pools at runtime 
(CASSANDRA-15277)
 + * Close channels on error (CASSANDRA-15407)
 + * Add documentation for Java 11 support in Cassandra (CASSANDRA-15428)
 +Merged from 3.11:
   * Fix nodetool compactionstats showing extra pending task for TWCS - patch 
implemented (CASSANDRA-15409)
   * Fix SELECT JSON formatting for the "duration" type (CASSANDRA-15075)
 - * Fix LegacyLayout to have same behavior as 2.x when handling unknown column 
names (CASSANDRA-15081)
   * Update nodetool help stop output (CASSANDRA-15401)
  Merged from 3.0:
+  * Include updates to static column in mutation size calculations 
(CASSANDRA-15293)
   * Fix point-in-time recoevery ignoring timestamp of updates to static 
columns (CASSANDRA-15292)
   * GC logs are also put under $CASSANDRA_LOG_DIR (CASSANDRA-14306)
   * Fix sstabledump's position key value when partitions have multiple rows 
(CASSANDRA-14721)
diff --cc test/unit/org/apache/cassandra/db/partition/PartitionUpdateTest.java
index 8f2f35b,0330b65..a4555c8
--- a/test/unit/org/apache/cassandra/db/partition/PartitionUpdateTest.java
+++ b/test/unit/org/apache/cassandra/db/partition/PartitionUpdateTest.java
@@@ -49,17 -49,39 +49,40 @@@ public class PartitionUpdateTest extend
      }
  
      @Test
+     public void testMutationSize()
+     {
+         createTable("CREATE TABLE %s (key text, clustering int, a int, s int 
static, PRIMARY KEY(key, clustering))");
 -        CFMetaData cfm = currentTableMetadata();
++        TableMetadata cfm = currentTableMetadata();
+ 
+         UpdateBuilder builder = UpdateBuilder.create(cfm, "key0");
+         builder.newRow().add("s", 1);
+         builder.newRow(1).add("a", 2);
+         int size1 = builder.build().dataSize();
+         Assert.assertEquals(44, size1);
+ 
+         builder = UpdateBuilder.create(cfm, "key0");
+         builder.newRow(1).add("a", 2);
+         int size2 = builder.build().dataSize();
+         Assert.assertTrue(size1 != size2);
+ 
+         builder = UpdateBuilder.create(cfm, "key0");
+         int size3 = builder.build().dataSize();
+         Assert.assertTrue(size2 != size3);
+ 
+     }
+ 
+     @Test
 -    public void testOperationCountWithCompactTable()
 +    public void testUpdateAllTimestamp()
      {
 -        createTable("CREATE TABLE %s (key text PRIMARY KEY, a int) WITH 
COMPACT STORAGE");
 -        CFMetaData cfm = currentTableMetadata();
 +        createTable("CREATE TABLE %s (key text, clustering int, a int, b int, 
c int, s int static, PRIMARY KEY(key, clustering))");
 +        TableMetadata cfm = currentTableMetadata();
  
 -        PartitionUpdate update = new RowUpdateBuilder(cfm, 
FBUtilities.timestampMicros(), "key0").add("a", 1)
 -                                                                              
                   .buildUpdate();
 -        Assert.assertEquals(1, update.operationCount());
 +        long timestamp = FBUtilities.timestampMicros();
 +        RowUpdateBuilder rub = new RowUpdateBuilder(cfm, timestamp, 
"key0").clustering(1).add("a", 1);
 +        PartitionUpdate pu = rub.buildUpdate();
 +        PartitionUpdate pu2 = new PartitionUpdate.Builder(pu, 
0).updateAllTimestamp(0).build();
  
 -        update = new RowUpdateBuilder(cfm, FBUtilities.timestampMicros(), 
"key0").buildUpdate();
 -        Assert.assertEquals(0, update.operationCount());
 +        Assert.assertTrue(pu.maxTimestamp() > 0);
 +        Assert.assertTrue(pu2.maxTimestamp() == 0);
      }
  }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to