Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6C4BB200C4E for ; Fri, 7 Apr 2017 02:52:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6AFA1160BA8; Fri, 7 Apr 2017 00:52:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B2531160B91 for ; Fri, 7 Apr 2017 02:52:11 +0200 (CEST) Received: (qmail 8324 invoked by uid 500); 7 Apr 2017 00:52:10 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 8305 invoked by uid 99); 7 Apr 2017 00:52:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2017 00:52:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AADA7E9627; Fri, 7 Apr 2017 00:52:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stefania@apache.org To: commits@cassandra.apache.org Date: Fri, 07 Apr 2017 00:52:13 -0000 Message-Id: <7720888e15c941cb83c72c875b145655@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [4/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11 archived-at: Fri, 07 Apr 2017 00:52:12 -0000 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 Authored: Fri Apr 7 08:46:45 2017 +0800 Committer: Stefania Alborghetti 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 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 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 TABLES_WITH_CDC_ADDED = ImmutableSet.of(TABLES, VIEWS); + private static final CFMetaData Keyspaces = compile(KEYSPACES, "keyspace definitions",