From commits-return-24317-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Wed Nov 4 00:00:32 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id A21FE18064E for ; Wed, 4 Nov 2020 01:00:32 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id E1EE644852 for ; Wed, 4 Nov 2020 00:00:31 +0000 (UTC) Received: (qmail 28620 invoked by uid 500); 4 Nov 2020 00:00:31 -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 28611 invoked by uid 99); 4 Nov 2020 00:00:31 -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; Wed, 04 Nov 2020 00:00:31 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8646E820EB; Wed, 4 Nov 2020 00:00:31 +0000 (UTC) Date: Wed, 04 Nov 2020 00:00:31 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] branch main updated: Minor comment wording improvement MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <160444803135.25080.11745599264496015497@gitbox.apache.org> From: ctubbsii@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Oldrev: de7b42f1c529b6475eabfbe0516ad652c543fa81 X-Git-Newrev: d7ca701f62e15d17a29be8f629a3c8cce826da37 X-Git-Rev: d7ca701f62e15d17a29be8f629a3c8cce826da37 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 main in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/main by this push: new d7ca701 Minor comment wording improvement d7ca701 is described below commit d7ca701f62e15d17a29be8f629a3c8cce826da37 Author: Christopher Tubbs AuthorDate: Tue Nov 3 18:59:37 2020 -0500 Minor comment wording improvement Improve comment wording for CompactionExecutor added in #1609 and merged with #1629 --- .../accumulo/tserver/compactions/CompactionExecutor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java index d30585a..aaa0232 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java @@ -55,8 +55,8 @@ public class CompactionExecutor { private ThreadPoolExecutor rawExecutor; // This exist to provide an accurate count of queued compactions for metrics. The PriorityQueue is - // not used because it size may be off because it contains cancelled compactions. The collection - // below should not contain cancelled compactions. A conncurrent set was not used because those do + // not used because its size may be off due to it containing cancelled compactions. The collection + // below should not contain cancelled compactions. A concurrent set was not used because those do // not have constant time size operations. private Set queuedTask = Collections.synchronizedSet(new HashSet<>()); @@ -116,9 +116,9 @@ public class CompactionExecutor { queuedTask.remove(this); if (canceled && cancelCount.incrementAndGet() % 1024 == 0) { - // Need to occasionally clean the queue which could have canceled task with low priority - // that hang around. Avoid cleaning the queue every time something is canceled as that could - // be expensive. + // Occasionally clean the queue of canceled tasks that have hung around because of their low + // priority. This runs periodically, instead of every time something is canceled, to avoid + // hurting performance. queue.removeIf(runnable -> ((CompactionTask) runnable).getStatus() == Status.CANCELED); }