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 6D6B818BF7 for ; Sat, 17 Oct 2015 10:36:23 +0000 (UTC) Received: (qmail 30254 invoked by uid 500); 17 Oct 2015 10:36:23 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 30207 invoked by uid 500); 17 Oct 2015 10:36:23 -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 30002 invoked by uid 99); 17 Oct 2015 10:36:23 -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; Sat, 17 Oct 2015 10:36:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EFBE3E098A; Sat, 17 Oct 2015 10:36:22 +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: Sat, 17 Oct 2015 10:36:23 -0000 Message-Id: <3c5669447dcb4f42b0f3d32dc24357b1@git.apache.org> In-Reply-To: <1e3aba76a5794ac38c76590ea4dde39c@git.apache.org> References: <1e3aba76a5794ac38c76590ea4dde39c@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/20ce2cf3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/20ce2cf3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/20ce2cf3 Branch: refs/heads/cassandra-3.0 Commit: 20ce2cf3564a113b6bcd9c4bc761dfeac37349a6 Parents: f497c13 27c8011 Author: Robert Stupp Authored: Sat Oct 17 11:38:27 2015 +0200 Committer: Robert Stupp Committed: Sat Oct 17 11:38:27 2015 +0200 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../cassandra/db/commitlog/CommitLogSegmentManager.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/20ce2cf3/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 632e262,7358689..889438f --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,7 -1,6 +1,8 @@@ -2.1.12 +2.2.4 + * Deprecate Pig support (CASSANDRA-10542) + * Reduce contention getting instances of CompositeType (CASSANDRA-10433) +Merged from 2.1: + * AssertionError: attempted to delete non-existing file CommitLog (CASSANDRA-10377) - * Merge range tombstones during compaction (CASSANDRA-7953) * (cqlsh) Distinguish negative and positive infinity in output (CASSANDRA-10523) * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970) * Don't allow startup if the node's rack has changed (CASSANDRA-10242) http://git-wip-us.apache.org/repos/asf/cassandra/blob/20ce2cf3/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java index f71bb1b,9310d67..2ca2fea --- a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java +++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java @@@ -339,10 -346,32 +339,16 @@@ public class CommitLogSegmentManage */ void recycleSegment(final CommitLogSegment segment) { - boolean archiveSuccess = CommitLog.instance.archiver.maybeWaitForArchiving(segment.getName()); - if (!activeSegments.remove(segment)) - { - logger.warn("segment {} not found in activeSegments queue", segment); - return; - } - if (!archiveSuccess) + boolean archiveSuccess = commitLog.archiver.maybeWaitForArchiving(segment.getName()); - activeSegments.remove(segment); - // if archiving (command) was not successful then leave the file alone. don't delete or recycle. - discardSegment(segment, archiveSuccess); ++ if (activeSegments.remove(segment)) + { + // if archiving (command) was not successful then leave the file alone. don't delete or recycle. - discardSegment(segment, false); - return; ++ discardSegment(segment, archiveSuccess); + } - if (isCapExceeded() || !DatabaseDescriptor.getCommitLogSegmentRecyclingEnabled()) ++ else + { - discardSegment(segment, true); - return; ++ logger.warn("segment {} not found in activeSegments queue", segment); + } - - logger.debug("Recycling {}", segment); - segmentManagementTasks.add(new Callable() - { - public CommitLogSegment call() - { - return segment.recycle(); - } - }); } /**