I'm not an expert on JVM atomicity, but i believe you are correct ... would you mind opening a bug and submitting a patch?
(i wonder if there are are there any other longs where we have the same problem) : > 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 -Hoss