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 61B38200B71 for ; Wed, 31 Aug 2016 21:26:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 601C6160AB4; Wed, 31 Aug 2016 19:26:12 +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 A895B160AA7 for ; Wed, 31 Aug 2016 21:26:11 +0200 (CEST) Received: (qmail 39407 invoked by uid 500); 31 Aug 2016 19:26:10 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 39387 invoked by uid 99); 31 Aug 2016 19:26:10 -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; Wed, 31 Aug 2016 19:26:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 349C7E01BD; Wed, 31 Aug 2016 19:26:10 +0000 (UTC) From: joshelser To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #143: ACCUMULO-4428 Fix state of GC firstSeenDead map Content-Type: text/plain Message-Id: <20160831192610.349C7E01BD@git1-us-west.apache.org> Date: Wed, 31 Aug 2016 19:26:10 +0000 (UTC) archived-at: Wed, 31 Aug 2016 19:26:12 -0000 Github user joshelser commented on a diff in the pull request: https://github.com/apache/accumulo/pull/143#discussion_r77055926 --- Diff: test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java --- @@ -139,6 +150,52 @@ public void gcTest() throws Exception { } @Test + public void gcDeleteDeadTServerWAL() throws Exception { + // Kill GC process + killMacGc(); + + // Create table and ingest data + Connector c = getConnector(); + c.tableOperations().create("test_ingest"); + c.tableOperations().setProperty("test_ingest", Property.TABLE_SPLIT_THRESHOLD.getKey(), "5K"); + String tableId = getConnector().tableOperations().tableIdMap().get("test_ingest"); + TestIngest.Opts opts = new TestIngest.Opts(); + VerifyIngest.Opts vopts = new VerifyIngest.Opts(); + vopts.rows = opts.rows = 10000; + vopts.cols = opts.cols = 1; + opts.setPrincipal("root"); + vopts.setPrincipal("root"); + TestIngest.ingest(c, opts, new BatchWriterOpts()); + + // Test WAL log has been created + List walsBefore = getWALsForTableId(tableId); + Assert.assertEquals("Should be one WAL", 1, walsBefore.size()); + + // Flush and check for no WAL logs + c.tableOperations().flush("test_ingest", null, null, true); + List walsAfter = getWALsForTableId(tableId); + Assert.assertEquals("Should be no WALs", 0, walsAfter.size()); + + // Validate WAL file still exists + String walFile = walsBefore.get(0).split("\\|")[0].replaceFirst("file:///", ""); + File wf = new File(walFile); + Assert.assertEquals("WAL file does not exist", true, wf.exists()); + + // Kill TServer and give it some time to die and master to rebalance + killMacTServer(); --- End diff -- Already pushed :) 8a3cc4f is the fix I did and it worked for me locally. Would be happy to have you look at it too! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---