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 E5455200B9D for ; Thu, 29 Sep 2016 03:30:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E40AD160AD3; Thu, 29 Sep 2016 01:30: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 2FDDC160ADD for ; Thu, 29 Sep 2016 03:30:50 +0200 (CEST) Received: (qmail 15625 invoked by uid 500); 29 Sep 2016 01:30:49 -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 15416 invoked by uid 99); 29 Sep 2016 01:30:49 -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, 29 Sep 2016 01:30:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C5FFEDFF4E; Thu, 29 Sep 2016 01:30:48 +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: Thu, 29 Sep 2016 01:30:48 -0000 Message-Id: <92e9c98960c7482b9234791263824d8d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/3] cassandra git commit: Fix failure in LogTransactionTest archived-at: Thu, 29 Sep 2016 01:30:51 -0000 Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 9dd805d0d -> 5cebd1fb0 refs/heads/trunk 3a79a027c -> 25d4c7baa Fix failure in LogTransactionTest Patch by Stefania Alborghetti; reviewed by Edward Capriolo for CASSANDRA-12632 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5cebd1fb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5cebd1fb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5cebd1fb Branch: refs/heads/cassandra-3.0 Commit: 5cebd1fb0d60e23ae5a30231e253806d58d0998e Parents: 9dd805d Author: Stefania Alborghetti Authored: Tue Sep 13 14:51:56 2016 +0800 Committer: Stefania Alborghetti Committed: Thu Sep 29 09:27:18 2016 +0800 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../cassandra/db/lifecycle/LogTransactionTest.java | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cebd1fb/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 6edc491..f2f8dac 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.10 + * Fix failure in LogTransactionTest (CASSANDRA-12632) * Fix potentially incomplete non-frozen UDT values when querying with the full primary key specified (CASSANDRA-12605) * Skip writing MV mutations to commitlog on mutation.applyUnsafe() (CASSANDRA-11670) http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cebd1fb/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java b/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java index 0f03baf..56df337 100644 --- a/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java +++ b/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java @@ -1003,11 +1003,15 @@ public class LogTransactionTest extends AbstractTransactionalTest assertNotNull(log); log.trackNew(sstableNew); - log.obsoleted(sstableOld); + LogTransaction.SSTableTidier tidier = log.obsoleted(sstableOld); // Modify the transaction log or disk state for sstableOld modifier.accept(log, sstableOld); + // Sync the folder to make sure that later on removeUnfinishedLeftovers picks up + // any changes to the txn files done by the modifier + assertNull(log.txnFile().syncFolder(null)); + assertNull(log.complete(null)); sstableOld.selfRef().release(); @@ -1040,6 +1044,9 @@ public class LogTransactionTest extends AbstractTransactionalTest oldFiles, log.logFilePaths()))); } + + // make sure to run the tidier to avoid any leaks in the logs + tidier.run(); } @Test @@ -1068,7 +1075,7 @@ public class LogTransactionTest extends AbstractTransactionalTest assertNotNull(log); log.trackNew(sstableNew); - /*TransactionLog.SSTableTidier tidier =*/ log.obsoleted(sstableOld); + LogTransaction.SSTableTidier tidier = log.obsoleted(sstableOld); //modify the old sstable files modifier.accept(sstableOld); @@ -1093,6 +1100,9 @@ public class LogTransactionTest extends AbstractTransactionalTest assertFiles(dataFolder.getPath(), Sets.newHashSet(Iterables.concat(sstableNew.getAllFilePaths(), sstableOld.getAllFilePaths(), log.logFilePaths()))); + + // make sure to run the tidier to avoid any leaks in the logs + tidier.run(); } @Test