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 059C6200D0C for ; Tue, 5 Sep 2017 20:49:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 042D31609E2; Tue, 5 Sep 2017 18:49:50 +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 4A143160BD5 for ; Tue, 5 Sep 2017 20:49:49 +0200 (CEST) Received: (qmail 38897 invoked by uid 500); 5 Sep 2017 18:49:47 -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 38268 invoked by uid 99); 5 Sep 2017 18:49:47 -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; Tue, 05 Sep 2017 18:49:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E61B6F5696; Tue, 5 Sep 2017 18:49:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jjirsa@apache.org To: commits@cassandra.apache.org Date: Tue, 05 Sep 2017 18:49:51 -0000 Message-Id: <1b1b0ee266424058b4fef8a3f61905d3@git.apache.org> In-Reply-To: <5445a551b41b47d1b68b341ca3844422@git.apache.org> References: <5445a551b41b47d1b68b341ca3844422@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [6/6] cassandra git commit: Merge branch 'cassandra-3.11' into trunk archived-at: Tue, 05 Sep 2017 18:49:50 -0000 Merge branch 'cassandra-3.11' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fa36044a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fa36044a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fa36044a Branch: refs/heads/trunk Commit: fa36044a585d2268d6dd61603f3fb21e6b8ec286 Parents: 733ea88 3f5f702 Author: Jeff Jirsa Authored: Tue Sep 5 11:48:04 2017 -0700 Committer: Jeff Jirsa Committed: Tue Sep 5 11:48:40 2017 -0700 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../apache/cassandra/db/commitlog/CommitLogReader.java | 3 ++- .../apache/cassandra/db/commitlog/CommitLogTest.java | 12 +++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fa36044a/CHANGES.txt ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fa36044a/src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java index 301c832,8c04329..864325b --- a/src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java +++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java @@@ -147,6 -149,7 +147,7 @@@ public class CommitLogReade if (desc == null) { // don't care about whether or not the handler thinks we can continue. We can't w/out descriptor. - // whether or not we continue with startup will depend on whether this is the last segment ++ // whether or not we can continue depends on whether this is the last segment handler.handleUnrecoverableError(new CommitLogReadException( String.format("Could not read commit log descriptor in file %s", file), CommitLogReadErrorReason.UNRECOVERABLE_DESCRIPTOR_ERROR, http://git-wip-us.apache.org/repos/asf/cassandra/blob/fa36044a/test/unit/org/apache/cassandra/db/commitlog/CommitLogTest.java ---------------------------------------------------------------------- diff --cc test/unit/org/apache/cassandra/db/commitlog/CommitLogTest.java index f98dd6b,aab55a5..956a05d --- a/test/unit/org/apache/cassandra/db/commitlog/CommitLogTest.java +++ b/test/unit/org/apache/cassandra/db/commitlog/CommitLogTest.java @@@ -153,9 -155,22 +156,16 @@@ public class CommitLogTes } @Test - public void testRecoveryWithFinalEmptyLog() throws Exception ++ public void testRecoveryWithEmptyFinalLog() throws Exception + { - // Even though it's empty, it's the last commitlog segment, so allowTruncation=true should allow it to pass - CommitLog.instance.recoverFiles(new File[]{tmpFile(CommitLogDescriptor.current_version)}); ++ CommitLog.instance.recoverFiles(tmpFile(CommitLogDescriptor.current_version)); + } + - @Test - public void testRecoveryWithEmptyLog20() throws Exception - { - CommitLog.instance.recoverFiles(tmpFile(CommitLogDescriptor.VERSION_20)); - } + + @Test public void testRecoveryWithZeroLog() throws Exception { - testRecovery(new byte[10], null); + testRecovery(new byte[10], CommitLogReplayException.class); } @Test --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org