cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefa...@apache.org
Subject [4/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Date Fri, 07 Apr 2017 00:52:13 GMT
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: ab1310b78a084b34ab9013344870433986eb960b
Parents: bfdc1e0 6991556
Author: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Authored: Fri Apr 7 08:46:45 2017 +0800
Committer: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Committed: Fri Apr 7 08:46:45 2017 +0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../apache/cassandra/schema/SchemaKeyspace.java | 23 +++++++++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab1310b7/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d3460d8,212c738..23e0225
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,25 -1,5 +1,26 @@@
 -3.0.13
 +3.11.0
 + * Fix testLimitSSTables flake caused by concurrent flush (CASSANDRA-12820)
 + * cdc column addition strikes again (CASSANDRA-13382)
 + * Fix static column indexes (CASSANDRA-13277)
 + * DataOutputBuffer.asNewBuffer broken (CASSANDRA-13298)
 + * unittest CipherFactoryTest failed on MacOS (CASSANDRA-13370)
 + * Forbid SELECT restrictions and CREATE INDEX over non-frozen UDT columns (CASSANDRA-13247)
 + * Default logging we ship will incorrectly print "?:?" for "%F:%L" pattern (CASSANDRA-13317)
 + * Possible AssertionError in UnfilteredRowIteratorWithLowerBound (CASSANDRA-13366)
 + * Support unaligned memory access for AArch64 (CASSANDRA-13326)
 + * Improve SASI range iterator efficiency on intersection with an empty range (CASSANDRA-12915).
 + * Fix equality comparisons of columns using the duration type (CASSANDRA-13174)
 + * Obfuscate password in stress-graphs (CASSANDRA-12233)
 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
 + * nodetool stopdaemon errors out (CASSANDRA-13030)
 + * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 + * Fix primary index calculation for SASI (CASSANDRA-12910)
 + * More fixes to the TokenAllocator (CASSANDRA-12990)
 + * NoReplicationTokenAllocator should work with zero replication factor (CASSANDRA-12983)
 + * Address message coalescing regression (CASSANDRA-12676)
 + * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 +Merged from 3.0:
+  * Fix startup problems due to schema tables not completely flushed (CASSANDRA-12213)
   * Fix view builder bug that can filter out data on restart (CASSANDRA-13405)
   * Fix 2i page size calculation when there are no regular columns (CASSANDRA-13400)
   * Fix the conversion of 2.X expired rows without regular column data (CASSANDRA-13395)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab1310b7/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/schema/SchemaKeyspace.java
index ff7cf04,e860c59..2c2416e
--- a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
+++ b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
@@@ -82,15 -81,22 +80,28 @@@ public final class SchemaKeyspac
      public static final String AGGREGATES = "aggregates";
      public static final String INDEXES = "indexes";
  
-     public static final List<String> ALL =
-         ImmutableList.of(KEYSPACES, TABLES, COLUMNS, DROPPED_COLUMNS, TRIGGERS, VIEWS, TYPES,
FUNCTIONS, AGGREGATES, INDEXES);
+     /**
+      * The order in this list matters.
+      *
+      * When flushing schema tables, we want to flush them in a way that mitigates the effects
of an abrupt shutdown whilst
+      * the tables are being flushed. On startup, we load the schema from disk before replaying
the CL, so we need to
+      * try to avoid problems like reading a table without columns or types, for example.
So columns and types should be
+      * flushed before tables, which should be flushed before keyspaces.
+      *
+      * When truncating, the order should be reversed. For immutable lists this is an efficient
operation that simply
+      * iterates in reverse order.
+      *
+      * See CASSANDRA-12213 for more details.
+      */
+     public static final ImmutableList<String> ALL =
+         ImmutableList.of(COLUMNS, DROPPED_COLUMNS, TRIGGERS, TYPES, FUNCTIONS, AGGREGATES,
INDEXES, TABLES, VIEWS, KEYSPACES);
  
 +    /**
 +     * The tables to which we added the cdc column. This is used in {@link #makeUpdateForSchema}
below to make sure we skip that
 +     * column is cdc is disabled as the columns breaks pre-cdc to post-cdc upgrades (typically,
3.0 -> 3.X).
 +     */
 +    private static final Set<String> TABLES_WITH_CDC_ADDED = ImmutableSet.of(TABLES,
VIEWS);
 +
      private static final CFMetaData Keyspaces =
          compile(KEYSPACES,
                  "keyspace definitions",


Mime
View raw message