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 C712E200C7F for ; Wed, 10 May 2017 06:18:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C5AFC160BC3; Wed, 10 May 2017 04:18:53 +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 0FEDB160BB6 for ; Wed, 10 May 2017 06:18:52 +0200 (CEST) Received: (qmail 67411 invoked by uid 500); 10 May 2017 04:18:52 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 67400 invoked by uid 99); 10 May 2017 04:18:51 -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, 10 May 2017 04:18:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B41DCDFBAB; Wed, 10 May 2017 04:18:51 +0000 (UTC) From: ppadma To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #827: DRILL-5481: Persist profiles in-memory only with a ... Content-Type: text/plain Message-Id: <20170510041851.B41DCDFBAB@git1-us-west.apache.org> Date: Wed, 10 May 2017 04:18:51 +0000 (UTC) archived-at: Wed, 10 May 2017 04:18:54 -0000 Github user ppadma commented on a diff in the pull request: https://github.com/apache/drill/pull/827#discussion_r115635985 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/store/InMemoryPersistentStore.java --- @@ -93,6 +106,14 @@ public void put(final String key, final V value, final DataChangeVersion dataCha throw new VersionMismatchException("Version mismatch detected", dataChangeVersion.getVersion()); } store.put(key, value); + currentSize.incrementAndGet(); + + if (currentSize.get() > maxCapacity) { --- End diff -- I guess you can combine and make it if (currentSize.incrementAndGet() > maxCapacity) --- 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. ---