commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (JCS-112) RemoteCacheServer.logUpdateInfo bug updating put count
Date Thu, 03 Apr 2014 22:37:15 GMT

     [ https://issues.apache.org/jira/browse/JCS-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved JCS-112.
----------------------

    Resolution: Fixed

URL: http://svn.apache.org/r1584435
Log:
JCS-112 RemoteCacheServer.logUpdateInfo bug updating put count

Modified:
    commons/proper/jcs/trunk/src/changes/changes.xml
    commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java


> 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)

Mime
View raw message