lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Timm <tim...@aol.com>
Subject RequestHandlerBase statistics atomicity problem?
Date Wed, 09 Apr 2008 19:35:10 GMT
> public abstract class RequestHandlerBase implements 
> SolrRequestHandler, SolrInfoMBean {
>
>   // statistics
>   // TODO: should we bother synchronizing these, or is an off-by-one error
>   // acceptable every million requests or so?
>   long numRequests;
>   long numErrors;
Shouldn't numRequests and numErrors be volatile variables?  Writes are 
not atomic on longs unless they are volatile.

-Sean

Mime
View raw message