Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CCEFC1037F for ; Thu, 3 Apr 2014 14:34:27 +0000 (UTC) Received: (qmail 2259 invoked by uid 500); 3 Apr 2014 14:34:25 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 1475 invoked by uid 500); 3 Apr 2014 14:34:21 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 804 invoked by uid 99); 3 Apr 2014 14:34:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2014 14:34:17 +0000 Date: Thu, 3 Apr 2014 14:34:17 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (JCS-112) RemoteCacheServer.logUpdateInfo bug updating put count MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Sebb created JCS-112: ------------------------ Summary: RemoteCacheServer.logUpdateInfo bug updating put count Key: JCS-112 URL: https://issues.apache.org/jira/browse/JCS-112 Project: Commons JCS Issue Type: Bug Reporter: Sebb The method RemoteCacheServer.logUpdateInfo contains the code: {code} if ( log.isInfoEnabled() ) { // not thread safe, but it doesn't have to be accurate puts++; if ( puts % logInterval == 0 ) { log.info( "puts = " + puts ); } } {code} This looks wrong - why is the put counter only update if logging is enabled? Looks like the issue occurred in r436643 where the getPutCount() method was added. Up until this point the puts field was only used in the above logging method, so it made sense to confine the updates to the logging conditional statement. However, now the count is used for unit tests, so it needs to be independent of the logging level. -- This message was sent by Atlassian JIRA (v6.2#6252)