lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-3661) RequestHandlerBase getStatistics method has atom problem
Date Tue, 24 Jul 2012 18:55:35 GMT

    [ https://issues.apache.org/jira/browse/SOLR-3661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421646#comment-13421646
] 

Hoss Man commented on SOLR-3661:
--------------------------------

You left out the comment that is directly above those variables...

{noformat}
// statistics
// TODO: should we bother synchronizing these, or is an off-by-one error
// acceptable every million requests or so?
{noformat}

...generally speaking, people tend to prefer saving a few microseconds over having perfectly
exact counts in their handler stats.  if you have a benchmark showing that there is zero overhead
in switching to to AtomicLong then it would certainly be worth considering adding more accuracy
                
> RequestHandlerBase getStatistics method has atom problem
> --------------------------------------------------------
>
>                 Key: SOLR-3661
>                 URL: https://issues.apache.org/jira/browse/SOLR-3661
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 4.0-ALPHA
>            Reporter: oznyang
>
> class org.apache.solr.handler.RequestHandlerBase 
> volatile long numRequests;
> volatile long numErrors;
> volatile long numTimeouts;
> not use synchronize,so may be has concurrent problem
> Recommend to use AtomicLong to instead it

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message