From commits-return-21781-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Thu Apr 26 23:04:32 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A9E60180679 for ; Thu, 26 Apr 2018 23:04:31 +0200 (CEST) Received: (qmail 82738 invoked by uid 500); 26 Apr 2018 21:04:30 -0000 Mailing-List: contact commits-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 commits@accumulo.apache.org Received: (qmail 82729 invoked by uid 99); 26 Apr 2018 21:04:30 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2018 21:04:30 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id E9479852F2; Thu, 26 Apr 2018 21:04:29 +0000 (UTC) Date: Thu, 26 Apr 2018 21:04:29 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] branch 1.9 updated: fixes #441 only dereference WALs after minc finishes (#443) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152477666987.17651.15583389395010741031@gitbox.apache.org> From: ctubbsii@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/1.9 X-Git-Reftype: branch X-Git-Oldrev: e86f0f95e1d54921d921f41c24678e498c366a40 X-Git-Newrev: 84791ec78086474b4b69281c72aab5c3983831b0 X-Git-Rev: 84791ec78086474b4b69281c72aab5c3983831b0 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 1.9 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/1.9 by this push: new 84791ec fixes #441 only dereference WALs after minc finishes (#443) 84791ec is described below commit 84791ec78086474b4b69281c72aab5c3983831b0 Author: Keith Turner AuthorDate: Thu Apr 26 17:04:27 2018 -0400 fixes #441 only dereference WALs after minc finishes (#443) * fixes #441 only dereference WALs after minc finishes --- .../main/java/org/apache/accumulo/tserver/TabletServer.java | 5 ++++- .../main/java/org/apache/accumulo/tserver/tablet/Tablet.java | 12 +++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java index 472b414..a0c2a81 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java @@ -3352,7 +3352,10 @@ public class TabletServer extends AccumuloServerContext implements Runnable { candidates = new HashSet<>(closedLogs); } for (Tablet tablet : getOnlineTablets()) { - candidates.removeAll(tablet.getCurrentLogFiles()); + tablet.removeInUseLogs(candidates); + if (candidates.isEmpty()) { + break; + } } try { TServerInstance session = this.getTabletSession(); diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java index 5018c97..774479b 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java @@ -2457,11 +2457,13 @@ public class Tablet implements TabletCommitter { } } - private ConcurrentSkipListSet currentLogs = new ConcurrentSkipListSet<>(); + private Set currentLogs = new HashSet<>(); - // currentLogs may be updated while a tablet is otherwise locked - public Set getCurrentLogFiles() { - return new HashSet<>(currentLogs); + public synchronized void removeInUseLogs(Set candidates) { + // remove logs related to minor compacting data + candidates.removeAll(otherLogs); + // remove logs related to tablets in memory data + candidates.removeAll(currentLogs); } Set beginClearingUnusedLogs() { @@ -2520,7 +2522,7 @@ public class Tablet implements TabletCommitter { // this lock is basically used to synchronize writing of log info to metadata private final ReentrantLock logLock = new ReentrantLock(); - public int getLogCount() { + public synchronized int getLogCount() { return currentLogs.size(); } -- To stop receiving notification emails like this one, please contact ctubbsii@apache.org.