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 B101A200B32 for ; Thu, 23 Jun 2016 15:18:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AF983160A6B; Thu, 23 Jun 2016 13:18:48 +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 066D8160A69 for ; Thu, 23 Jun 2016 15:18:47 +0200 (CEST) Received: (qmail 34706 invoked by uid 500); 23 Jun 2016 13:18:46 -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 34351 invoked by uid 99); 23 Jun 2016 13:18:46 -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, 23 Jun 2016 13:18:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 841D7E9682; Thu, 23 Jun 2016 13:18:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: marcuse@apache.org To: commits@cassandra.apache.org Date: Thu, 23 Jun 2016 13:18:51 -0000 Message-Id: In-Reply-To: <966d9d474e004ce3a710ae6e48026010@git.apache.org> References: <966d9d474e004ce3a710ae6e48026010@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [06/12] cassandra git commit: Don't try to get sstables for non-repairing column families archived-at: Thu, 23 Jun 2016 13:18:48 -0000 Don't try to get sstables for non-repairing column families Patch by marcuse; reviewed by Paulo Motta for CASSANDRA-12077 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9358e589 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9358e589 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9358e589 Branch: refs/heads/trunk Commit: 9358e589e292a2c851d069aebd36819f8e767f5b Parents: 3c8421a Author: Marcus Eriksson Authored: Thu Jun 23 09:46:00 2016 +0200 Committer: Marcus Eriksson Committed: Thu Jun 23 14:49:59 2016 +0200 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/service/ActiveRepairService.java | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9358e589/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 03246ae..620568d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.15 + * Don't try to get sstables for non-repairing column families (CASSANDRA-12077) * Prevent select statements with clustering key > 64k (CASSANDRA-11882) * Avoid marking too many sstables as repaired (CASSANDRA-11696) * Fix clock skew corrupting other nodes with paxos (CASSANDRA-11991) http://git-wip-us.apache.org/repos/asf/cassandra/blob/9358e589/src/java/org/apache/cassandra/service/ActiveRepairService.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/ActiveRepairService.java b/src/java/org/apache/cassandra/service/ActiveRepairService.java index bab244d..4ca1e42 100644 --- a/src/java/org/apache/cassandra/service/ActiveRepairService.java +++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java @@ -528,7 +528,10 @@ public class ActiveRepairService implements IEndpointStateChangeSubscriber, IFai { assert marked.contains(cfId); ImmutableMap.Builder> references = ImmutableMap.builder(); - for (SSTableReader sstable : getActiveSSTables(cfId)) + Iterable sstables = getActiveSSTables(cfId); + if (sstables == null) + throw new RuntimeException("Not possible to get sstables for anticompaction for " + cfId); + for (SSTableReader sstable : sstables) { Ref ref = sstable.tryRef(); if (ref == null) @@ -567,6 +570,9 @@ public class ActiveRepairService implements IEndpointStateChangeSubscriber, IFai { if (failed) return Collections.emptySet(); + if (!columnFamilyStores.containsKey(cfId)) + return null; + Set repairedSSTables = sstableMap.get(cfId); Set activeSSTables = new HashSet<>(); Set activeSSTableNames = new HashSet<>();