Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C676B17C86 for ; Thu, 17 Sep 2015 21:27:40 +0000 (UTC) Received: (qmail 81371 invoked by uid 500); 17 Sep 2015 21:27:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 81241 invoked by uid 500); 17 Sep 2015 21:27:40 -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 81187 invoked by uid 99); 17 Sep 2015 21:27:40 -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; Thu, 17 Sep 2015 21:27:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5A501E10C7; Thu, 17 Sep 2015 21:27:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: snazy@apache.org To: commits@cassandra.apache.org Date: Thu, 17 Sep 2015 21:27:41 -0000 Message-Id: <7afe42b529104c6facf10263bec6c5bd@git.apache.org> In-Reply-To: <71a236853db94b37835d753d337cbfde@git.apache.org> References: <71a236853db94b37835d753d337cbfde@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/3] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2 Merge branch 'cassandra-2.1' into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/93745c05 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/93745c05 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/93745c05 Branch: refs/heads/cassandra-3.0 Commit: 93745c05c7dd7ad841d6f5dc79f2140891ca75a0 Parents: eecfb07 0b8b67b Author: Robert Stupp Authored: Thu Sep 17 23:23:35 2015 +0200 Committer: Robert Stupp Committed: Thu Sep 17 23:23:35 2015 +0200 ---------------------------------------------------------------------- CHANGES.txt | 2 +- .../apache/cassandra/cache/AutoSavingCache.java | 50 ++++++++++++++------ .../apache/cassandra/cql3/KeyCacheCqlTest.java | 1 + 3 files changed, 37 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/93745c05/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index f9314f6,e2dd83a..59a50a5 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,15 -1,5 +1,15 @@@ -2.1.10 +2.2.2 + * Defer default role manager setup until all nodes are on 2.2+ (CASSANDRA-9761) + * Cancel transaction for sstables we wont redistribute index summary + for (CASSANDRA-10270) + * Handle missing RoleManager in config after upgrade to 2.2 (CASSANDRA-10209) + * Retry snapshot deletion after compaction and gc on Windows (CASSANDRA-10222) + * Fix failure to start with space in directory path on Windows (CASSANDRA-10239) + * Fix repair hang when snapshot failed (CASSANDRA-10057) + * Fall back to 1/4 commitlog volume for commitlog_total_space on small disks + (CASSANDRA-10199) +Merged from 2.1: - * Fix cache handling of 2i and base tables (CASSANDRA-10155) + * Fix cache handling of 2i and base tables (CASSANDRA-10155, 10359) * Fix NPE in nodetool compactionhistory (CASSANDRA-9758) * (Pig) support BulkOutputFormat as a URL parameter (CASSANDRA-7410) * BATCH statement is broken in cqlsh (CASSANDRA-10272) http://git-wip-us.apache.org/repos/asf/cassandra/blob/93745c05/src/java/org/apache/cassandra/cache/AutoSavingCache.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cache/AutoSavingCache.java index 3ec9d4e,1174c44..48d60b7 --- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java +++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java @@@ -184,9 -176,19 +184,18 @@@ public class AutoSavingCache>> futures = new ArrayDeque>>(); - while (in.available() > 0) { //ksname and cfname are serialized by the serializers in CacheService @@@ -335,27 -322,34 +344,38 @@@ throw new RuntimeException(e); } - while (keyIterator.hasNext()) + try { - K key = keyIterator.next(); - - ColumnFamilyStore cfs = Schema.instance.getColumnFamilyStoreIncludingIndexes(key.ksAndCFName); - if (cfs == null) - continue; // the table or 2i has been dropped. - - try + //Need to be able to check schema version because CF names are ambiguous + UUID schemaVersion = Schema.instance.getVersion(); + if (schemaVersion == null) { - cacheLoader.serialize(key, writer, cfs); + Schema.instance.updateVersion(); + schemaVersion = Schema.instance.getVersion(); } - catch (IOException e) + writer.writeLong(schemaVersion.getMostSignificantBits()); + writer.writeLong(schemaVersion.getLeastSignificantBits()); + - for (K key : keys) ++ while (keyIterator.hasNext()) { - throw new FSWriteError(e, cacheFilePaths.left); - } ++ K key = keyIterator.next(); - keysWritten++; - if (keysWritten >= keysEstimate) - break; + ColumnFamilyStore cfs = Schema.instance.getColumnFamilyStoreIncludingIndexes(key.ksAndCFName); + if (cfs == null) + continue; // the table or 2i has been dropped. + + cacheLoader.serialize(key, writer, cfs); + + keysWritten++; ++ if (keysWritten >= keysEstimate) ++ break; + } } + catch (IOException e) + { - throw new FSWriteError(e, tempCacheFile); ++ throw new FSWriteError(e, cacheFilePaths.left); + } ++ } finally { http://git-wip-us.apache.org/repos/asf/cassandra/blob/93745c05/test/unit/org/apache/cassandra/cql3/KeyCacheCqlTest.java ----------------------------------------------------------------------